Browse Source

VLCMediaCategoryViewController: Encapsulate UICollectionViewDelegateFlowLayout

Soomin Lee 6 years ago
parent
commit
0b5e9f0d23
1 changed files with 4 additions and 1 deletions
  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)