Reputation: 3701
I have an app that has an UIScrollView
as the main subview of a view controller. User can scroll left/right between different UIView
s. And each view will have its own UITableView
.
My question is just how many views and table views can one view controller handle before it will get laggy and slow?
Will it be possible to have 10 views and 10 table views and still run smooth on iPhone 4 or should I come up with another way? And if so, how can I improve this?
EDIT:
I have been thinking about using UIPageViewController
but I want so have parallax like scrolling between screens (yahoo weather like).
How does Yahoo weather handle so many views?
Upvotes: 3
Views: 559
Reputation: 15566
You can have massive amounts of views and subviews that are all handled by the same controller. Views are not drawn unless they are currently being displayed.
That being said, there are definitely some recycling solutions you can utilize to speed things up if you start noticing performance issues (like removing the memory of a table if it is no longer immediately needed).
The main reason you would start having complications is because of calculations to populate the data. If you have 10 tableviews all of the datasource and delegate methods could get slowed. You could use container views to encapsulate view logic. Also, as mentioned in comments, a UIPageViewController
may be a good solution.
Upvotes: 1