     private var aUnderlyingImage: UIImage!
     private var loadingInProgress: Bool!
     public var  photoPath: String!
-    private var downloadSession: NSURLSession!
     
     
     convenience public init(image: UIImage) {

    
    override init() {
        super.init()
        let sessionConfig = NSURLSessionConfiguration.defaultSessionConfiguration()
        
        downloadSession = NSURLSession(configuration: sessionConfig, delegate: self, delegateQueue: nil)
        
    }
}
// MARK: - NSURLSessionDelegate

                    self.loadImageFromFileAsync()
                })
            }else if let url = photoURL {
                let key = "\(url.hash)"
                let CacheCenter = SDImageCache.sharedImageCache()
                if let cache = CacheCenter.imageFromDiskCacheForKey(key) {
                    aUnderlyingImage = cache
                    imageLoadingComplete()
                    return
                }
                SDWebImageDownloader.sharedDownloader().downloadImageWithURL(url, options: SDWebImageDownloaderOptions.ContinueInBackground, progress: { (read, total) -> Void in
                    let progress = CGFloat(read)/CGFloat(total)
                    dispatch_async(dispatch_get_main_queue(), { () -> Void in
                        progressUpdateBlock?(progress)
                    })
                }, completed: { (img, data, err, flag) -> Void in
                    if let image = img {
                        self.aUnderlyingImage = image
                        self.imageLoadingComplete()
                        CacheCenter.storeImage(image, forKey: key, toDisk: true)
                    }
                    
                })
                
            }
        }
        
