iOS7 - View under status bar - edgesForExtendedLayout not working

前端 未结 7 1966
予麋鹿
予麋鹿 2020-12-28 17:30

I have a project that was built last year, and it uses XIBs, no storyboards. The XIBs do not use Auto Layout, but they do use some Autosizing. I have an issue when running

7条回答
  •  萌比男神i
    2020-12-28 17:52

    - (void)viewDidAppear:(BOOL)animated {
            [self.view setFrame:CGRectMake(0, 20, self.view.frame.size.width, self.view.frame.size.height)];
    // OR
            self.view.transform = CGAffineTransformMakeTranslation(0, 20);
    }
    

提交回复
热议问题