iPhone how to create a full screen app?

前端 未结 5 1251
野性不改
野性不改 2021-02-01 18:35

I\'ve been trying to create a full screen view. I plan on using core graphics for rendering. I am new to iPhone development so please forgive this basic question.

Here\'

相关标签:
5条回答
  • 2021-02-01 18:52

    This works and it is the easiest

    UIViewControllerBasedStatusBarAppearance : NO in the .plist

    0 讨论(0)
  • 2021-02-01 19:04

    There are two methods;

    In the info.plist for your application add a boolean key UIStatusBarHidden and set it to true.

    At runtime you can call setStatusBarHidden on your application to show/hide the status bar. E.g.

    [[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]
    
    0 讨论(0)
  • 2021-02-01 19:06

    You may also want to make your rect = [[UIScreen mainScreen] applicationFrame]

    0 讨论(0)
  • 2021-02-01 19:07

    Add below method in respective view controller

    -(BOOL) prefersStatusBarHidden

    It worked for me.

    0 讨论(0)
  • 2021-02-01 19:12

    Since I just found the answer I was looking for here, I may as well add that the above method is now depreciated. The modern method is:

    - (void)setStatusBarHidden:(BOOL)hidden withAnimation:(UIStatusBarAnimation)animation

    Thanks!

    0 讨论(0)
提交回复
热议问题