I want the content of the collectionView to start from the very top of the screen (top of status bar) because I have transparent navigation bar, I want to avoid magic numbers and it should work with iPhone X and other iPhones.
What I have tried ?
collectionView.contentInset = UIEdgeInsets(top: -64, left: 0, bottom: 0, right: 0)
but it’s not an elegant solution and it’s not correct for iPhone X the inset needs to be increased
Any clean solution ?
Target iOS 10 and 11