iOS navigation bar occlusion issues---the knowledge of developing---projects in the iOS Development series Seven

Source: Internet
Author: User

I do not know if you have met their own written TableView is blocked by the navigation bar problems, anyway, I have met!

Since all Uiviewcontroller are created after iOS7, the default is full screen, so if some of the controls in the app interface with the navigation bar are overwritten by the navigation bar.

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

Extendlayoutincludesopaquebars Specifies whether the view extends to the area of bar when the bar is using an opaque picture, and the default value is No.

The edgesforextendedlayout is the area that represents whether the view is covered to four weeks, the default is Uirectedgeall, that is, the upper and lower left and right four directions will be overwritten.

Here I share several solutions, hoping to help you solve the problem

1.

1       // the problem of adapting Ios7uinavigationbar occlusion TableView 2    Self.navigationController.navigationBar.translucent = NO;

2.

    if ([[[[[[Uidevice Currentdevice] systemversion] doublevalue]>=7.0)        } {=  Uirectedgenone;         = NO;         = NO;    }

3.

    if ([[[[Uidevice currentdevice]systemversion]floatvalue]>=7.0]    {        = uirectedgenone;         = NO;    }

iOS navigation bar occlusion issues---the knowledge of developing---projects in the iOS Development series Seven

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.