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

VLCMediaCategoryViewController: Encapsulate UICollectionViewDelegateFlowLayout

Soomin Lee преди 6 години
родител
ревизия
0b5e9f0d23
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      Sources/MediaCategories/MediaCategoryViewController.swift

+ 4 - 1
Sources/MediaCategories/MediaCategoryViewController.swift

@@ -213,8 +213,11 @@ class VLCMediaCategoryViewController: UICollectionViewController, UICollectionVi
             play(media: media)
         }
     }
+}
+
+// MARK: - UICollectionViewDelegateFlowLayout
 
-    // MARK: - UICollectionViewDelegateFlowLayout
+extension VLCMediaCategoryViewController {
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
         if cachedCellSize == .zero {
             cachedCellSize = model.cellType.cellSizeForWidth(collectionView.frame.size.width)