When you implemented the
UITableViewCell in the previous chapter, you designed a custom cell. This cell was a view that was reused by the
UITableView for every contact in the contacts array.
UICollectionView also uses cells but you can't use
UITableViewCell in a
UICollectionView. However, the two different cells do share some functionalities, such as the
prepareForReuse method and the
awakeFromNib method, we saw in the previous chapter.
When you replaced the table view with a collection view, you might have noticed that the collection view immediately contained a default cell. This cell is a lot more flexible than the table view cell was; you can resize both its width and its height.
If you ...