I've got a nib:
From top to bottom, the constraints are:
- vertical space 15, priority 1000
- title label compression resistance priority 1000
- vertical space 3, priority 1000
- subtitle label compression resistance priority 1000
- vertical space 15, priority 1000
Title and subtitle are multiline and lines = 0 in the nib.
collectionView:viewForSupplementaryElementOfKind:atIndexPath:
returns a header view containing a subview created from the nib. The subview is constrained to pin all edges to the header view edges.
Problem is that when the the header is created, the title is only 1 line but should be 2 lines. When items are added to the subtitle, the title becomes 2 lines. When the collection view is scrolled, the title collapses to 1 line again. The height of the header view doesn't change, but the title is not 2 lines like it's supposed to be.
On creation or after scrolling:
After adding element to subtitle:
This happens on iOS 9 and 320 width screens but apparently does not happen elsewhere. Don't see it happening on iOS 8 or 6/6+ with iOS 9. Any ideas or workaround?