iOS TableView TableHeader highly incorrect

Source: Internet
Author: User

Today, we created a uiviewcontroller with xib, then changed it to Uitableviewcontroller, and then I created a tableheader with xib, and then there was a problem, The TableHeader height with the code is not a problem, and then various changes, all kinds of data, have failed to solve the problem. I am sure xib created TableHeader no problem, but the height is wrong, make me very egg pain, not only tableheader height problem, I add a subview to TableView, height and width also have problems, check a few times xib layout, Make sure Xib is really fine, but frame is not right, and all sorts of attempts do not solve the problem. Finally, it is not intended to solve the problem:
In the controller's Viewdidload method to reset the TableView frame (I have added constraints in xib)), and then all the view frame is normal, as to ask what appeared this problem, I confused, want to know friends pointing. self.tableView.frame = CGRectMake (0, 0, KSCREENWIDHT, kscreenheight-ktabbarheight);

Macro definition of code everyone should know.

Related Article

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.