iOS – Change navigation color on iOS

We have two solution we can solve like this.

  1. First solution.
    1. Set the UIViewControllerBasedStatusBarAppearance to YES in the .plist file.
    2. In the viewDidLoad do a [self setNeedsStatusBarAppearanceUpdate];
    3. Add the following method:
  -(UIStatusBarStyle)preferredStatusBarStyle{
    return UIStatusBarStyleLightContent;
  }
  
  1. Second solution.
    1. Set the UIViewControllerBasedStatusBarAppearance to NO in the .plist file.
    2. Put the [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

That’s it.

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다