0

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?

4

1 に答える 1

0

スーパービューの境界外のサブビューは非表示になります (テーブル ビューのセルもそのサブビューです)。これはiOSのビュー階層がどのように機能するかであり、実際にはパフォーマンスに関するものではありません. また、サブビュー/セルが画面に表示されているときにユーザーが操作できない場合は意味がありません (範囲外であるため)。特に、テーブル ビューはその範囲外のセルを再利用するため、セルを「常に表示」するように設定することはできません。

于 2013-06-26T09:32:01.777 に答える