     }
 }
 
-class PhotoManager: NSObject {
-    static var sharedInstance: PhotoManager = PhotoManager()
+public class PhotoManager: NSObject {
+    public static var sharedInstance: PhotoManager = PhotoManager()
     
     fileprivate var smartAlbums: [PHAssetCollection] = []
     fileprivate var userCollections: [PHCollection] = []

            }
        }
    }
    
    //  Check selected IndexPath
    func isSelectedIndexPath(identifier: String) -> Bool {
        return selectedIdentifiers.index(of: identifier) != nil
    }
    
    //  Append selected IndexPath
    func setSelectedIndexPath(identifier: String) {
        if let index = selectedIdentifiers.index(of: identifier) {
            selectedIdentifiers.remove(at: index)
        } else {
            if selectedItemCount < CHECK_MAX_COUNT {
                selectedIdentifiers.append(identifier)
            }
        }
    }
    
    //  
    func performChanges(changeBlock: @escaping () -> (), completionHandler: ((Bool, Error?) -> ())?) {
        PHPhotoLibrary.shared().performChanges(changeBlock, completionHandler: completionHandler)
    }
}

//  MARK:- PHAssetCollection

        assetToImage(asset: asset, imageSize: thumbnailSize, isCliping: isCliping,completionHandler: completionHandler)
    }
    
    //  Check selected IndexPath
    func isSelectedIndexPath(identifier: String) -> Bool {
        return selectedIdentifiers.index(of: identifier) != nil
    }
    
    //  Append selected IndexPath
    func setSelectedIndexPath(identifier: String) {
        if let index = selectedIdentifiers.index(of: identifier) {
            selectedIdentifiers.remove(at: index)
        } else {
            if selectedItemCount < CHECK_MAX_COUNT {
                selectedIdentifiers.append(identifier)
            }
        }
    }
    
    //  
    func performChanges(changeBlock: @escaping () -> (), completionHandler: ((Bool, Error?) -> ())?) {
        PHPhotoLibrary.shared().performChanges(changeBlock, completionHandler: completionHandler)
    }
}

public extension PhotoManager {
    func assetToImage(asset: PHAsset, imageSize: CGSize, isCliping: Bool = false, completionHandler: ((UIImage)->())?) {
        imageManager.requestImage(for: asset, targetSize: imageSize, contentMode: .aspectFill, options: imageRequestOptions) { image, _ in
            if let thumbnameImage = image {
                if isCliping {
