Specify the proportion for autolayout.
For autoresizingMask, don't fix top and bottom, fix the height, and then change it with the supview ratio.
In fact, you don't need to think about pressing the line, because the tableview is scrolling, and you cannot be sure that the line will not be pressed at any time. You can roughly estimate the height based on the height of the cell, but then you have to set y manually.
Specify the proportion for autolayout.
For autoresizingMask, don't fix top and bottom, fix the height, and then change it with the supview ratio.
In fact, you don't need to think about pressing the line, because the tableview is scrolling, and you cannot be sure that the line will not be pressed at any time. You can roughly estimate the height based on the height of the cell, but then you have to set y manually.
I think the best way is not to display those horizontal lines in rows without data. This way the line won't be pressed.
A simple way is to add: