View got hidden below UINavigationBar iOS 7

前端 未结 9 1562
粉色の甜心
粉色の甜心 2020-12-02 13:10

Earlier, I was using iOS 6.1 for my project. Recently I have switched to iOS 7. For, a lot of changes I knew, I updated my code.. But I have observed a strange behavior. My

相关标签:
9条回答
  • 2020-12-02 13:30

    In Swift 2.2, use

    self.edgesForExtendedLayout = .None
    
    0 讨论(0)
  • 2020-12-02 13:33

    Swift 3+:

    self.edgesForExtendedLayout = []
    
    0 讨论(0)
  • 2020-12-02 13:41

    Look up this key: UIViewControllerBasedStatusBarAppearance.

    It's used in your app's info PLIST file and will come up as:

    View controller-based status bar appearance

    This will allow you to control the status bar's appearance. There's a bunch of API changes for status bars, go have a look in the documentation for new UIViewController methods such as

    - (void)prefersStatusBarHidden;

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