Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tabBar & navigation bar became dark after updating to Xcode 8

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

enter image description here

and when I select any other tab the problems gets fix

in the below image I've selected tab2

enter image description here

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 enter image description here


when any other tab is selected enter image description here

i dont know why but tabbar's UIVisualEffectBackdropView's background color is black on tab1 and its transparent in other tabs

like image 423
remy boys Avatar asked Sep 19 '16 11:09

remy boys


1 Answers

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.

like image 199
Jamie Birch Avatar answered Sep 18 '22 01:09

Jamie Birch