I have a UICollectionView using flow layout, and I'm trying to achieve the same margins as a UITableViewController with readable content width.
The closest I've come to matching this layout behavior is to embed a UICollectionViewController within a UIViewController and have the embedded view "Follow Readable Width".
Here the teal color is the UIViewController and the salmon color is the UICollectionViewController. The problem is the teal area doesn't scroll the UICollectionView and the scroll indicators are also not along the edge of the screen like you would expect.
My question is:
How can I achieve this layout without having to embed a
UICollectionViewController?
My guess is that I can somehow set the UICollectionView left and right section insets to match the readable content guide margins and update them by overriding viewWillTransition(to size: with coordinator:) and observing UIContentSizeCategoryDidChange notifications, but I'm not sure how to go about this.

