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

前端 未结 9 1357
慢半拍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:53

    Having reviewed all the answers provided here and in other answers, I have found that the only solution that worked for me was to create a vacuous navigation bar for the view controller I am presenting modally.

    This may not work for you, but it works for me for the following reasons:

    1. My modal dialog has a navigation bar anyways (although it is not used for navigation; it is simply used to either save or dismiss the results.
    2. The status bar color has already been defined application-wide in applicationDidFinishLaunching as discussed above, and it has a custom colour.

    It's somewhat annoying from an engineering perspective to have a navigation controller that effectively does nothing, but without one I was unable to get past this problem.

提交回复
热议问题