3

If someone doesn't know, Facebook open sourced a new library called componentkit

The documentation says

ComponentKit really shines when used with a UICollectionView.

Facebook developed this lib for their news feed. That means that they are using the UICollectionView for it and not what I thought the UITableView.

Why is Facebook using the UICollectionView instead of the UITableView?

I mean the news feed is actually a table view or not?

Do you have any idea? What do you think about it?

Doug Amos
  • 4,243
  • 1
  • 22
  • 23
Eike
  • 2,311
  • 20
  • 31

1 Answers1

11

Facebook feed is indeed a UICollectionView and this is mostly for the flexibility it offers moving forward.

With our custom layout, we can move around / animate the cells fairly cleanly. You can attempt to do with a UITableView, but it requires some substantial hacks that we would rather avoid.

When we migrated from UITableView to UICollectionView we also noticed an uptick in scroll performance. Unfortunately I haven't been able to identify the exact call that got faster.

  • Hey @Clément Genzmer sorry I have one more question. When you are using ComponentKit you probably don't use the storyboards and the nib files at all anymore? Is that correct? – Eike Apr 20 '15 at 14:36
  • We don't use nibs or storyboards across any of our (main) apps, as we've found they're difficult to use with larger teams. – mrtom Aug 02 '15 at 20:10
  • how to make Facebook cell using componentKit – Asim Iftikhar Abbasi Oct 28 '17 at 16:42