Преглед на файлове

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 години
родител
ревизия
42a59e8a85
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  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() {