It depends on the requirements. How application flows determine which type of user interface to integrate into the application.
Mostly users use UICollectionview to create types of user interfaces with multiple images displayed in a grid. This would have complicated logic with a UITableView , but with a UICollectionview it would be easy.
When using UICollectionview you donβt need to set buttons with tags or other things, getting the selected element values. You can simply get -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath and in UITableViewDelegate :
`-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath`
You get the selected row instead of the element, so itβs better to use UICollectionview to create a grid or changed elements.
People use a UITableView for listing information for each item because it displays more information about each item.
Apple Docs:
UICollectionView class reference
The UICollectionView class manages an ordered set of data items and presents them using custom layouts. Collection views provide the same general function as table views, except that the collection view can support more than single-column layouts. Collection views support custom layouts that you can use to implement multi-column grids, mosaic layouts, circular layouts, and more. You can even change the layout of the collection view dynamically if you want.
Link to the UITableView Class
The table view displays a list of items in a single column. UITableView is a subclass of UIScrollView that allows users to scroll through a table, although UITableView only allows vertical scrolling. Cells containing individual table elements are UITableViewCell objects; UITableView uses these objects to draw the visible rows of the table. Cells have content headers and images and can have accessory views near the right edge. Standard types of accessories are disclosure indicators or disclosure buttons; the former leads to the next level in the data hierarchy, and the latter leads to a detailed representation of the selected item. Accessory aspects can also be structure controls, such as switches and sliders, or can be customizable views. Table views can enter an editing mode in which users can insert, delete, and rearrange table rows.
Nitin Gohel Apr 15 '14 at 9:02 2014-04-15 09:02
source share