 class MKViewController: UICollectionViewController ,UIAdaptivePresentationControllerDelegate{
     var  photoList:[String]?
     fileprivate var  photoOrientation=[PhotoOrientation]()
-    fileprivate var  photosCache = NSCache<NSString, UIImage>()
+    fileprivate var  photosCache = [String:UIImage]()
     
     
     func photoDirectory()->String{

                }
            }
            DispatchQueue.main.async(execute: { () -> Void in
                self.photosCache.setObject(thumbImage!, forKey: photoName as NSString)
                cell.photoView.image=thumbImage
            })
            

        let photoName = self.photoList?[(indexPath as NSIndexPath).row] ?? ""
        let photoFilePath = self.photoDirectory()+"/"+photoName
        cell.nameLabel.text = NSString(string: photoName).deletingPathExtension
        var thumbImage = self.photosCache[photoName]
        cell.photoView.image = thumbImage
        if thumbImage == nil{
           DispatchQueue.global(qos:.userInitiated).async(execute: { () -> Void in
