Bladeren bron

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 jaren geleden
bovenliggende
commit
42a59e8a85
1 gewijzigde bestanden met toevoegingen van 2 en 0 verwijderingen
  1. 2 0
      Sources/MediaCategories/MediaCategoryViewController.swift

+ 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() {