Contentsize automatic change of UITableView under IOS8

Source: Internet
Author: User

Encounter a problem, a page has a uitableview, in the iOS8 click on the image or link push to the next page and then return, the bottom of the tableview is covered at the bottom of the screen, only the moment to swipe to see. There is no such problem on the iOS7 system.

Simple positioning, is in return when the UITableView contentsize automatically become smaller, first contact with this problem, it is quite bizarre, because after the return code to contentsize did not make any changes. So, is the system automatically modified for contentsize?

Search for this article: (IOS) about UITableView settings contentsize, probably know the reason, UITableView contentsize is generally calculated automatically, even if you change the time will always be automatically calculated at some point, This automatic calculation is triggered when the return is probably made.

Looked at the previous code, indeed someone to set up the place contentsize, then, now is good to do, to avoid human settings on the line. The reason for setting up Contentsize is because a custom view has been added to the top of the TableView, and the view is TableView Addsubview and Setcontentinset. TableView does not calculate the custom view when it calculates contentsize automatically.

Think of TableView has a Tableheaderview attribute, I add a custom view through this property, I do not have to calculate the contentsize, the problem is resolved.

Contentsize automatic change of UITableView under IOS8

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.