Reputation: 44312
I've been working with a UIScrollView
and have about 200 items to scroll through...so far. This doesn't work since it takes around 45 seconds to load all of the views. I've tried loading the first 20 (about 4 seconds) on the main thread then load in blocks of 50 on other threads. I get the first 20 to scroll through but the others don't appear.
It's taken lots of effort just to get the UIScrollView
to work properly and there are still some issues. The UITableView
will solve all of this for me since it reuses cells. It's similar to the UIScrollView
except more efficient.
I'd like to have one cell take up the entire viewing area and have the user flick through each cell. Rather than freely scrolling through cells, scrolling will stop at each cell and the user must flick again for the next cell. The UITableView
doesn't do this that I know of. Is there a way to get this behavior with a UITableView
?
Upvotes: 0
Views: 3111
Reputation: 3095
UITableView
is a subclass of UIScrollView
. Have you tried simply setting yourTableView.pagingEnabled = YES
?
Upvotes: 2
Reputation: 113300
Short answer: no.
You can try to control UITableView's scrolling behavior using the delegate methods, or better yet, stick with UIScrollView and load the views one-by-one in the UIScrollViewDelegate methods.
Upvotes: 1