浏览代码

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)
             play(media: media)
         }
         }
     }
     }
+}
+
+// MARK: - UICollectionViewDelegateFlowLayout
 
 
-    // MARK: - UICollectionViewDelegateFlowLayout
+extension VLCMediaCategoryViewController {
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
         if cachedCellSize == .zero {
         if cachedCellSize == .zero {
             cachedCellSize = model.cellType.cellSizeForWidth(collectionView.frame.size.width)
             cachedCellSize = model.cellType.cellSizeForWidth(collectionView.frame.size.width)