Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UICollectionView VS UITableview

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.

like image 1000
sleepy_ios Avatar asked Jun 18 '13 21:06

sleepy_ios


People also ask

What is the difference between UICollectionView and UITableView?

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.

What is a UICollectionView?

An object that manages an ordered collection of data items and presents them using customizable layouts.

Will UITableView be deprecated?

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.

What is a UITableView?

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.


1 Answers

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.

like image 194
yonosoytu Avatar answered Sep 26 '22 12:09

yonosoytu