Why is Facebook using UICollectionView instead of UITableView for their News Feed

1.5k views Asked by At

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?

1

There are 1 answers

3
Clément Genzmer On BEST ANSWER

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.