The trouble with using Edgesforextendedlayout

Source: Internet
Author: User

Today, when I write a project that returns from one interface to another, there are two classes of problems that are encountered: Firstviewcontroller and Buttonviewcontroller.

From Firstviewcontroller into Buttonviewcontroller, I used them in FIRSTVIEWCONTROLLER.M and BUTTONVIEWCONTROLLER.M respectively:

Self.navigationController.navigationBarHidden = YES;  //   Hide the navigation bar     FIRSTVIEWCONTROLLER.M
Self.navigationController.navigationBarHidden = NO; Restore the page navigation bar in BUTTONVIEWCONTROLLER.M

At this point, think this is good, when the simulator opened, found that the Buttonviewcontroller interface Contentview part of the navigation bar is obscured, so after baidu.com reference http://blog.csdn.net/ CNY901111/ARTICLE/DETAILS/26529949 uses the following code:

Self.edgesforextendedlayout = Uirectedgenone;  

But the problem came again, when running on the simulator, found that the navigation bar position when entering Buttonviewcontroller "lag" phenomenon, the solution code is as follows:

// will   self.edgesforextendedlayout = uirectedgenone; // instead:self.navigationController.navigationBar.translucent =NO;

Can. When translucent is not set (the default is YES), the navigation bar defaults to translucent color, so you need to set it up as well.

The trouble with using Edgesforextendedlayout

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.