Create UICollectionView inside UITableViewCell - like App Store, Instagram and Facebook

in #swift7 years ago

Most apps with complex UI now doesn't simply display a table of things or a grid of things that we can achieve by using a single UITableView or UICollectionView.

Apps like Instagram, App Store use complex and very flexible UI that it has multiple layout of items among different cells.

How can we create this? The answer is Next UICollectionView in a UITableViewCell.

But there's a problem. Most people will just subclass UITableViewCell and make the UITableViewCell the collectionView's delegate and datasource.

This method fundamentally violates MVC. We need a better solution.

Watch this training for all the detail. You'll learn:

  • How to nest UICollectionView in UITableViewCell
  • How to set the UICollectionView's datasource and delegate object properly for scale and MVC implementation.
  • How to implement UITableView's delegate methods
  • How to implement UICollectionView's datasource and delegate methods

Coin Marketplace

STEEM 0.20
TRX 0.25
JST 0.039
BTC 97371.04
ETH 3473.35
USDT 1.00
SBD 3.20