I feel weird replying to my own post, but since no one else has replied, I'm going to seed this with another example of why developers want this.
While my above example uses a two column grid, another common use case is a collection view containing a section with an orthogonal scroll direction, and a series of items with potentially different heights (self-sizing for the win, right?). Think: Horizontally scrolling carousel of cards. It's easy to force the height of this "carousel" and its items to some fixed height, but we don't want that. We want the content to self-size and the height to be a function of that. That's also easy if we don't care about the vertical alignment of the items, or requiring the items to share the height of the tallest item. Here's a visual aid:
How can we leverage self-sizing, but then additional require that all of the items in the group must share the height of the tallest item?
In a more general sense, you can think of this as an alignment issue. How do you leverage self-sizing but then control the alignment of the items within the group? By default, they're top-aligned. That's often fine, but sometimes you might want center-aligned or even bottom-aligned. And the case I'm asking about could be thought of as "fully justified" (if we interpret that to mean, "stretching all of the items to fill the available height, which itself is dictated by the height of the tallest item."
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: