ios-solution when encountering tableview overall move-up

Source: Internet
Author: User

Programme I

When the Navigationcontroller is used, when the interface jumps back and forth, sometimes the TableView or collectionview move up, and it usually automatically moves up to 64 pixels, then this is the case We can turn off the TableView auto-fit 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

Programme III

I used to experience when I clicked on the image to enlarge and then returned, it would appear that the TableView moved up 20 pixels overall, and then I found it was Mjphotobrowser Third-party framework issues, and then I consulted our team leader, who later added a few words to the mjphotobrowser.m controller .

When it is, it's the one I drew, and then it's okay.

ios-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.