System adaptation One of the Talk: iOS7 and iOS8 about the navigation bar.

Source: Internet
Author: User

The view in Uiviewcontroller in previous versions of iOS7 is automatically adjusted to remove the height of the navigation bar when displayed, and controls are automatically placed below the navigation bar.

The Wantsfullscreenlayout attribute Uiviewcontroller in iOS7 is discarded, and all Uiviewcontroller are created by default So if some of the controls in the app interface with the navigation bar are covered by the navigation bar.

Solution: You can use the iOS7 uiviewcontroller new properties Extendlayoutincludesopaquebars and Edgesforextendedlayout to resolve.

This property specifies whether an attempt is made to extend to the area of bar when the bar is using an opaque picture, and the default value is No. and Edgesforextendedlayout

This property specifies whether the view extends to the area of bar when the bar is using an opaque picture, the default value is No. And edgesforextendedlayout is to indicate whether the view covers the area of four weeks, the default is Uirectedgeall, that is, the upper and lower left and right four directions will be overwritten, so that the top does not extend to the area covered by the navigation bar, we can extend the top area to remove. The implementation code is as follows:


Self.extendedlayoutincludesopaquebars = NO;

Self.edgesforextendedlayout = Uirectedgebottom | Uirectedgeleft | Uirectedgeright;

System adaptation One of the Talk: iOS7 and iOS8 about the navigation bar.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.