Kaynağa Gözat

VLCMediaCategoryViewController: correctly size cells

When we turn the device while watching a movie we don't get the safeareas did change event
the calculation was therefor based on a wrong width. Relayouting in viewwillAppear fixes this issue

(closes #524)
Carola Nitz 6 yıl önce
ebeveyn
işleme
42a59e8a85

+ 2 - 0
Sources/MediaCategories/MediaCategoryViewController.swift

@@ -159,6 +159,8 @@ class VLCMediaCategoryViewController: UICollectionViewController, UICollectionVi
             manager.start()
         }
         manager.presentingViewController = self
+        cachedCellSize = .zero
+        collectionView.collectionViewLayout.invalidateLayout()
     }
 
     @objc func themeDidChange() {