HomeiOS DevelopmentiOS 26: UITabBar coloration has bug with UIScrollView

iOS 26: UITabBar coloration has bug with UIScrollView


demo: https://github.com/Bo0628/iOS26UITabBarColorDemo

In my venture, the window.rootViewController is a UITabBarController containing 4 UIViewControllers. The primary, third, and fourth VCs are empty, whereas the second VC’s view hierarchy is structured as follows:

UITabBarController
├── UIViewController
├── UIViewController
    ├── UIScrollView (contentSize: self.view.width * 2, 0; backgroundColor: .crimson)
        ├── UIScrollView (contentSize: 0, self.view.top * 2; backgroundColor: .black)
        └── UIScrollView (contentSize: 0, self.view.top * 2; backgroundColor: .white)
├── UIViewController
├── UIViewController

After I swap to the second tab and horizontally scroll the scrollView, the tabBar coloration would not adapt to the present view’s dominant coloration. Nevertheless, if I launch the app and sequentially faucet each tab earlier than switching to the second tab, the tabBar coloration then adjustments dynamically throughout horizontal scrolling. But when I background the app and return, the tabBar reverts to black.

Why does this occur? How can I both: Manually management the tabBar coloration, or Make it mechanically match the web page’s dominant coloration?

This challenge happens when the "Cut back Transparency" accessibility setting is enabled & UITabBar.isTranslucent = true.

iOS 26: UITabBar coloration has bug with UIScrollView

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments