         registerForPreviewing(with: self, sourceView: view)
         
         column = 2
-        if let layout = collectionViewLayout as? OptimizedViewFlowLayout
+        if let layout = collectionViewLayout as? AssetCollectionFlowLayout
         {
             layout.setup(containerWidth: view.frame.width, column: column, margin: 1)
         }

    var takenImages:[CameraModel.CameraAsset] = []
    
    private var column = 3
    private var layout:OptimizedViewFlowLayout!
    
    override var collectionViewLayout: UICollectionViewLayout
    {
        if layout == nil
        {
            layout = OptimizedViewFlowLayout()
        }
        return layout
    }

    @IBOutlet weak var ib_image:UIImageView!
}

class AssetCollectionFlowLayout:UICollectionViewFlowLayout
{
    var spacing:CGFloat = 1
    func setup(containerWidth width:CGFloat, column:Int, margin:CGFloat, cellAspect ratio:CGFloat = 0.75)
