A common task when developing iOS apps is to register custom cell subclasses for both UITableView
and UICollectionView
. Well, that is if you don’t use Storyboards, of course.
Both UITableView
and UICollectionView
offer a similar API to register custom cell classes:
public func register(_ cellClass: AnyClass?, forCellReuseIdentifier identifier: String)
public func register(_ nib: UINib?, forCellReuseIdentifier identifier: String)