     {
         spinner.stopAnimating()
     }
+    
+    //MARK: collectionView delegate
+    
+    func collectionView(_ collectionView:UICollectionView, layout collectionViewLayout:UICollectionViewLayout, sizeForItemAt indexPath:IndexPath) -> CGSize
+    {
+        let item:MHomeUploadItem = modelAtIndex(index:indexPath)
+        let size:CGSize = item.imageSize
+        
+        return size
+    }
+    
+    func numberOfSections(in collectionView:UICollectionView) -> Int
+    {
+        return 1
+    }
+    
+    func collectionView(_ collectionView:UICollectionView, numberOfItemsInSection section:Int) -> Int
+    {
+        let count:Int = controller.model.items.count
+        
+        return count
+    }
+    
+    func collectionView(_ collectionView:UICollectionView, cellForItemAt indexPath:IndexPath) -> UICollectionViewCell
+    {
+        let item:MHomeUploadItem = modelAtIndex(index:indexPath)
+        let cell:VHomeUploadCell = collectionView.dequeueReusableCell(
+            withReuseIdentifier:VHomeUploadCell.reusableIdentifier,
+            for:indexPath) as! VHomeUploadCell
+        cell.config(model:item)
+        
+        return cell
+    }
 }

            options:[],
            metrics:metrics,
            views:views))
    }
    
    //MARK: public

import UIKit

class VHomeUpload:UIView, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout
{
    weak var controller:CHomeUpload!
    weak var spinner:VSpinner!
