• UICollectionView/UITableView for vertical scrolling • UICollectionView inside each cell • Separate out your data sources if necessary (I recommend something else entirely)
displayed, and perform a start action (make an API call, show a loader etc) • When the cell moves out of display area, get rid of resources • When you’re reaching the end of a horizontal list, talk to the network client and update state
to make some extra work by querying the VC’s view for a sizeThatFits/constrainedSize • Every contained VC would have to support a “nil” state (where it’s ready to be reused). In your prepareForReuse, set that “nil” state and in your “configure” method, set the correct state. • ……Prepare for lots of reuse bugs and code weirdness because UIKit wasn’t really built for something like this
// It's wrong to assume VCs are initialized via nibName:Bundle func configure(with state: State) static var create: (CreationArgs) -> Self { get set } var intrinsicContentSize: CGSize { get } func sizeThatFits(_ size: CGSize) -> CGSize }