Auto-sizing UICollectionView headers
问题 I'm trying to make a detail screen for a to-do list kind of app. Here's what the detail screen currently looks like: This is a UICollectionViewController , with a header. The header contains 2 UILabel objects, and a UITextView object. The layout of these objects is managed by a vertical UIStackView . A UIView is used to set a white background. I'm having some difficulties in defining the height of this UICollectionReusableView at runtime. Any advice is appreciated. 回答1: This is a bit of a