iPhone how to create a full screen app?

六月ゝ 毕业季﹏ 提交于 2019-12-02 20:21:36
Andrew Grant

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]

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!

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

Add below method in respective view controller

-(BOOL) prefersStatusBarHidden

It worked for me.

This works and it is the easiest

UIViewControllerBasedStatusBarAppearance : NO in the .plist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!