Navigation bar for split view controller is darker when inside a tab bar controller

前端 未结 3 1996
忘了有多久
忘了有多久 2021-02-06 11:01

If you place a split view controller inside a tab bar controller the navigation bar and tab bar are darker on the left side. I\'ve attached a screenshot. I created this by cre

3条回答
  •  别跟我提以往
    2021-02-06 11:43

    At the time of writing (May 2017) this bug still exists. I can't believe Apple doesn't take care of this. The worse part is that if you rotate your device, open the master from the side and rotate back, the translucent bars switch place and suddenly the master has a working translucent bar and the detail has not. :/

    The only possible fix I was able to come up with, was to get rid of UITabBarController and instead build my own implementation of a tab bar controller using a plain UIViewController with a UITabBar at the bottom and the UIViewController containment API.

    This means a lot of coding to reinvent the wheel. Its sad to not make use of UITabBarController but thats how it is. You have to make a trade off between the container controller and all its nice features like the "More" controller you get for free vs having translucent bars.

    If you can live without translucent bars, I'd still go for UITabBarController over do all the coding. On the other hand, one could replace the UITabBar with a UICollectionView and have more than 6 items without having the need for a "More" controller at all.

提交回复
热议问题