After updating my Xcode to Xcode 8, i'm facing this strange issue. I have a tab bar and 3 tabs in it when tab1 is selected tab bar and navigation looks like this :
tab bar's background color is white but its showing a dark color instead
and when I select any other tab the problems gets fix
in the below image I've selected tab2
I do not know why its happening but in tab1's ViewController I have a tableView and in tab2 I have a ViewController
anybody knows why is this happening ??
debug hierarchy :
when TAB1 is selected
when any other tab is selected
i dont know why but tabbar's UIVisualEffectBackdropView's background color is black on tab1 and its transparent in other tabs
For anyone else suffering this problem for different reasons to OP:
This exact problem occurred for me when I added the line edgesForExtendedLayout = []
into my UIViewController's loadView()
method to stop my view going under the navigation bar. Thus, removing that line and instead achieving the same aim using navigationController?.navigationBar.isTranslucent = false
fixed it for me (although John Doe's solution may have been viable too). I guess that when there is no view laid under your toolbar, the UIVisualEffectBackdropView
becomes opaque and it just happens to be black. This appears to produce a dark toolbar if your toolbar is transparent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With