TableHeaderView height problem

Today we use xib to add tableheaderview adaptive height

After the effect comes out, the height is always wrong, there will be some blanks below

I found various solutions and couldn't solve it.

Helpless biadu

I saw that some netizens said that they need to reset the tableheaderview, but it still can’t be solved.

Finally found a way

Mainly, views created by xib will have this kind of problem. Code creation has no problem.

Solution:

        You can create a new view with code first, add the headerview created by xib to the view, and then set the view to the headerview 

problem solved

I have not found the cause of the problem for the time being, there is a better way, please leave a message and reply

Guess you like

Origin blog.csdn.net/wangletiancsdn/article/details/102801322