iOS development-Solution when encountering tableview overall move-up

Source: Internet
Author: User

Programme I
After the Navigationcontroller is used, when the interface jumps back and forth, and sometimes there is a tableview move up, usually automatically up to 64 pixels, then we can turn off the TableView automatic adaptation layout.

Self.automaticallyadjustsscrollviewinsets = no;//default is yes

Scenario Two:
When the TableView overall move up, you can of course modify each View in Xcode and move them down by 20 pixels (status bar height) or 64 pixels (status bar + navigation bar height).
But Apple has apparently taken this into account, and they have provided a new edgesforextendedlayout for Viewcontroller in the IOS 7 SDK. If you set this property to Uirectedgenone, all child views of Viewcontroller will be adjusted automatically.
Currently, it is also applicable to different system version code changes when the situation occurs.

Self.edgesforextendedlayout = uirectedgenone;//Recommended

iOS development-Solution when encountering tableview overall move-up

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.