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.21
TRX 0.20
JST 0.034
BTC 91904.22
ETH 3093.99
USDT 1.00
SBD 3.11