I have an app which will show over a 1000 items, all of those item details are local ( saved via coredaata) and will ship with the app.
In researching the UI mechanisms to show those items, I am in between choosing uicollectionview or tableviewcontroller with a customized cell. My question is : Which choice would be more efficient and provide a smoother UI in terms of dragging? which one can I customize to load out the 1000 entries I have only enough the provide a smooth scroll, and load more cells as needed?
Thanks.
UICollectionView is the model for displaying multidimensional data . UITableViewhas a couple of styles of cells stacked one over the other. You should not try to bend it to do any other kind of things too much complex than that kind of layout.
An object that manages an ordered collection of data items and presents them using customizable layouts.
It's already well known that UITableView class has become obsolete, and even Apple admits it. It's poorly customizable and has a variety of issues related to auto-resizing cells, autolayout, etc.
UITableView manages the basic appearance of the table, but your app provides the cells ( UITableViewCell objects) that display the actual content. The standard cell configurations display a simple combination of text and images, but you can define custom cells that display any content you want.
Both approachs will handle 1000 entries easily if you follow the good practices of view/cell reusing. Additionally both APIs are very similar, so jumping from one to the other is not that hard.
The main difference between the two is how you want to display those 1000 items. UITableView
has a couple of styles of cells stacked one over the other. You should not try to bend it to do any other kind of things too much complex than that kind of layout. UICollectionView
is a much more powerful set of classes that allow to modify almost every aspect of how your data will appear in screen, specially its layout, but also other things. You can see UITableViews
in almost every iOS application (for example Contacts or iPod), while UICollectionViews
are more difficult to see (the grid in Photos, but also the coverflow in iPod).
So, if you need something standard like most table views in iOS I will choose the UITableView
, but if you need more control over your layout, go with UICollectionView
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With