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.