Is it possible to make UITable continuous?

I would like to make UITable continuous, which means that when the user scrolls to the top line, he can continue to scroll and see the bottom content.

Example:
if this is a normal configuration:
- line 1 -
- line 2 -
- line 3 -
- line 4 -

I would like it to look like this: ...
- line 3 -
- line 4 -
- line 1 -
- line 2 -
- line 3 -
- line 4 -
- line 1 -
- line 2 -
...

Thanks!

+4
source share
4 answers

As I understand correctly, you need some kind of endless table. I am afraid that the implementation of UITable does not allow this.

+2
source

The beta version of iOS 5 has an API that allows you to do this. Since it has not yet been released, all I am going to say. Find it, and then ask questions http://devforums.apple.com (or wait for iOS 5 to be released this fall).

Another option is to report a very large number of rows (for example, 100000) to a UITableView , and then quietly adjust the scroll location of the table when it stops scrolling. ( [tableView scrollToRowAtIndexPath:anIndexPath animated:NO]; ) You may have trouble maintaining the exact location of the scroll, but you might be able to get around this, possibly using setContentOffset:animated: :? I'm not quite sure; I have to try.

In practice, however, this usually works. For example, in this way, the UIDatePicker achieves its “endless” scrolling when displaying dates. However, the limitations of placing rows on a UIDatePicker are different from what they are on a UITableView , but the principle is the same ...

+1
source

You cannot do this based on a UITableView.

Tableview is a rather encapsulated element type that interacts only with your code at the points where you configure it (as much as possible) and where it asks for the data to be filled.

So, instead of feeding him what you would like to show, you need to wait until he asks his delegate for the data, and even then you have the opportunity to give him what he needs - a cell for a specific place in the table.

I'm afraid you will have to do it from scratch.

0
source

check this question: How to make an infinite UITableView? . However, all of these methods are just hacks that won't work forever! As always, I'm afraid you will have to start from scratch, maybe just distribute UIViews, each of which contains a cell, manipulating their frames.

0
source

All Articles