0
votes

I have an UITableView that does not fill the whole screen, so there is some space at the top and the bottom of the screen. This table uses table.clipToBounds = NO and table.bounces = YES.

But when scrolling the cells outside the original frame of the table, the cells are hidden. I know that's the normal behavior of UITableView to increase performance. But is it possible to define an area at the top/bottom of UITableView within which the cells are not hidden? Or even set a cell property to be "always" visible?

1
I may have understood your question wrong but wouldn't using a bigger frame solve this?Moxy

1 Answers

0
votes

Subviews outside bounds of superview are hidden (table view's cells are also its subviews). That's just how iOS view hierarchy works, not really about performance. And it doesn't make any sense when a subview/cell is displayed on the screen while user cannot interact with it (because it's out of bounds). In particular, table view reuses cells that go out of its bounds, so no, you cannot set a cell to be "always visible".