iOS 7: modal view controller status bar is wrong color but normal view controllers are correct

前端 未结 9 1464
慢半拍i
慢半拍i 2021-02-05 06:20

I have an issue in iOS7 where a normal UINavigationController pushed view controller has the correct status bar text color for the UINavigationController navbar color (which is

9条回答
  •  星月不相逢
    2021-02-05 06:49

    I was having the same problem as you were having. The info.plist was correct and everywhere else preferredStatusBarStyle was called correctly. But not in my modal view. That is because preferredStatusBarStyle was sent to the navigation controller. So I made a subclass of UINavigationController that passed on preferredStatusBarStyle to the view controller it was presenting, and voila, all was behaving as it should again

提交回复
热议问题