UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

using only UICollectionView instead of UITableView?

Forums > iOS

@johnk  

Generally speaking, do we think that a new modern iOS app (written in Swift) should use only UICollectionView, instead of UITableView? Or is there still a good case to be made for using each? It feels like most of Apple's focus going forward is on UICollectionView (e.g. UICollectionViewCompositionalLayout in iOS 13), and that perhaps UITableView will eventually be deprecated.

Currently my app uses some of each, but some things (especially static menu pages) are still a little easier with UITableView. My data-driven pages currently are a mix of UICollectionView and UITableView, all driven by diffable data sources.

Perhaps WWDC next week will provide some guidance in this area. (And maybe SwiftUI will get support for collection views.)

3      

I am pondering this question also right now. UICollectionView is more flexible and screens built with it can easily work great on iPad. On the other hand table view is much easier to work with which is in no doubt due to experience but you also have basic cells ready, the new inset grouped style is pretty good and you have swipe to delete with options of having more actions.

Plus the tableHeaderView and footerView do come in handy so I would not deprecate table view just yet ;-)

4      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.