I have code for my collectionView that adjusts the content so that it sits beneath the navigation bar.
collectionView.contentInsetAdjustmentBehavior = .never
let tabBarHeight = self.tabBarController?.tabBar.bounds.height
let navBarHeight = self.navigationController?.navigationBar.bounds.height
self.edgesForExtendedLayout = UIRectEdge.all
self.collectionView.contentInset = UIEdgeInsets(top: navBarHeight!, left: 0.0, bottom: tabBarHeight!, right: 0.0)
This works well on every other device on iOS 11 except for iPhone X, on iPhone X, the content sits behind the nav bar and toolbar on app start.
Is there something I am missing for iPhone X specifically?
Thanks