statusbar overlapping content in iOS7

前端 未结 2 1431
谎友^
谎友^ 2020-12-10 06:25

With iOS7 the toolbar I placed right under the statusbar has merged with the statusbar

\"enter

相关标签:
2条回答
  • 2020-12-10 07:18

    Try set in plist "View controller-based status bar appearance" to NO

    0 讨论(0)
  • 2020-12-10 07:27

    Set yourself as the toolbar delegate. Then in your view controller, implement UIBarPositioningDelegate. Implement it as follows:

    Objective-C

    - (UIBarPosition)positionForBar:(id <UIBarPositioning>)bar {
        return UIBarPositionTopAttached;
    }
    

    Swift

    func positionForBar(bar: UIBarPositioning) -> UIBarPosition {
      return .TopAttached
    }
    

    Also make sure you move your toolbar 20 points down (as you already did), or right underneath the status bar, for this effect to take place.

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