how to present a view controller on iOS7 without the status bar overlapping

后端 未结 4 1053
闹比i
闹比i 2020-12-13 00:57

I\'m seeing when I migrated my app to iOS 7, the nav bar is appearing under the status bar when presenting a view controller. I think a lot of people have run into this same

4条回答
  •  甜味超标
    2020-12-13 01:33

    Next code worked for me. Just put it to the controller which is presenting the new controller.

    #pragma mark hidden status bar
    - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
    {
        [[UIApplication sharedApplication] setStatusBarHidden:YES];
    }
    

提交回复
热议问题