0

Is is possible to implement smooth scrolling using both a UIScrollView and placing a UITableView at somewhere starting in the middle of the screen? The UIScrollView contentSize is elongated to accomodate the additional height of the UITableView. The UITableView should be able to contain unlimited and unknown number of rows. Scrolling the entire view downwards will cause the upper non-tableview portion to first disappear and then it scrolls down just like a regular table view.

Put it in another way, I'd like to implement a table with some fixed content before the top row. Think of it like a "header area" for the tables, scrolls up and giving way to the entire table rows.

I probably know that I can implement a TableView and programatically make the first row to contain some fixed images. In this way, it will work as expected. But which is easier to implement?

4

1 回答 1

1

您真的不想将表格放在滚动视图中。当用户在表格上滚动时,它不会移动底层的滚动视图,因此您不会得到您正在寻找的效果。

改为实现 viewForHeaderInSection 并传入要在第一行上方显示的视图,或设置 tableViewHeader。

于 2012-05-17T15:42:03.900 回答