Closed elland closed 7 years ago
UITableViewController and UICollectionViewController for example, don't required you to make a separate subclass of UITableView or UICollectionView, in the other side, if you're using UIViewController you most likely should have a subclass for your view.
On the other hand, you probably don't want to use either a UITableViewController
or UICollectionViewController
for this, as adding subviews to them is cumbersome and full of caveats. If you're not adding any subviews, you don't have to do anything to lay them out either.
Oh, you mean like using UIViewController with a table view or a collection view on top.
In that case maybe we could say:
If you want to use a UITableViewController or UICollectionViewController, it's better if you use SweetTableViewController or SweetCollectionController instead, since they provide you non-optional views.
But we don't have them yet. 😠should we start this today?
Wanna take care of it?
@3lvis let's rock this boat.
Added https://github.com/UseSweet/SweetUIKit 💥
We agreed on using auto-layout as much as possible now, but in the interest of decluttering controllers and compartmentalisation, we also think we should avoid configuring the views inside the controller as well. So as much configuration code as possible should come from the view. That means that the view would become more aware of its subviews as well. So the focus would be view composition, instead of a view controller managing everything.