Skip to content

Commit 281a7d4

Browse files
committed
Fix insets on the tv and movies on iPhone X
1 parent 6e56358 commit 281a7d4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Fetch/PosterCollectionViewController.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ class PosterCollectionViewController: UICollectionViewController, UICollectionVi
1919
automaticallyAdjustsScrollViewInsets = false
2020
}
2121

22+
@available(iOS 11.0, *)
23+
override func viewSafeAreaInsetsDidChange() {
24+
super.viewSafeAreaInsetsDidChange()
25+
collectionView?.contentInset = UIEdgeInsetsMake(0, view.safeAreaInsets.left, 0, view.safeAreaInsets.right)
26+
}
27+
2228
// MARK: UICollectionViewDelegate
2329

2430
override func collectionView(_ collectionView: UICollectionView, didHighlightItemAt indexPath: IndexPath) {

0 commit comments

Comments
 (0)