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

in #swift6 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.29
TRX 0.12
JST 0.034
BTC 63521.22
ETH 3319.09
USDT 1.00
SBD 3.91