The previous project encountered this problem. Indeed, the previous project did not encounter this problem. Yes, you are right.

Test code SDK iOS9.2 environment and others have not tried

I refer to the standard of this blog at http://blog.csdn.net/woaifen3344/article/details/50166659

But as a lazy person who does not want to open his mouth, it is good to tag brother, but there are many codes, which is not what I want

I was wondering if I could set the height directly at the end of the return area.

– (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {

UIView * baseView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 64)];

baseView.backgroundColor = [UIColor blueColor];

return baseView;

}

It worked but I didn’t set it to 64! ?

Check it out and I’ve done the same

– (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {

return 100;

}

Does that have anything to do with it? It’s okay. You want to try it?

– (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {

return 64;

}

Sure enough, the height of the end of the region is exactly the same as the height of the proxy function. In that case, is it independent of the view being returned?

– (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {

UIView * baseView = [[UIView alloc] init];

baseView.backgroundColor = [UIColor blueColor];

return baseView;

}

Still have 64pt blue area OK!! But there are still some questions that I have

– (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section; 

– (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section;

Under the breakpoint operation result is the system first performed – CGFloat tableView: (UITableView *) tableView heightForFooterInSection (NSInteger) section;

– (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section;

So I guess layout will first in – (CGFloat) tableView: (UITableView *) tableView heightForFooterInSection (NSInteger) section; Get the constraint height to the end of the zone view and then in

Pass – (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section; The end of the section returns the view and assigns the obtained constraint height directly to the modified view


How does the table header constraint in 9.2 work so far


1 Directly write the constraint height in the corresponding return height function of the header and tail of the constraint area

2 In the header and tail view of the corresponding return area

UIView * view = [UIView new];

return view; A view can be a subclass of UIView

Doesn’t it feel good to just take two steps