I have a simple UICollectionView using UICollectionViewFlowLayout. It also has a section supplementary view of kind UICollectionElementKindSectionHeader. When the section header is visible on screen and device is rotated, the constraints adjusts the sub-views of the header correctly.
If I scroll away such that the section header is not visible on screen, rotate the device and scroll back to see the header view, the constraints of the sub-views do not update and adjust sub-views position according to the device rotation. Is there a fix to this?
Essentially the header view (supplementary view) trailing space constraints with respect to the UICollectionView is not taking effect, this is how header view (white bar on top) looks like:

layoutSubviewsin yourcollectionView, or in your header view if you have a reference to it. - EmilioPelaez