How to set the top position = 0 after setStatusBarHidden:Yes?

后端 未结 6 400
栀梦
栀梦 2020-12-09 11:26

I found that after setting the

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]

at viewDidLoad, then if

6条回答
  •  情歌与酒
    2020-12-09 12:25

    If you have a scroll view nested inside a view make sure to change that also. This code solved all my issues.

    [self.view setFrame: [self.view bounds]];
    [self.theScroller setFrame: [self.view bounds]];
    

    "theScroller" is the name of my scrollview.

提交回复
热议问题