diff --git a/LPAlbum.podspec b/LPAlbum.podspec index 368d639..f6fc753 100644 --- a/LPAlbum.podspec +++ b/LPAlbum.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "LPAlbum" - s.version = "0.0.3" + s.version = "0.0.4" s.summary = "Can a decent enough photo album, photo album multi-select" s.homepage = "https://github.com/loopeer/LPAlbum" diff --git a/LPAlbum/Controllers/LPAlbum.swift b/LPAlbum/Controllers/LPAlbum.swift index 1d2dabc..383501e 100644 --- a/LPAlbum/Controllers/LPAlbum.swift +++ b/LPAlbum/Controllers/LPAlbum.swift @@ -45,8 +45,9 @@ public class LPAlbum: UIViewController { let itemSize = (self.collectionView.collectionViewLayout as! UICollectionViewFlowLayout).itemSize let scale = UIScreen.main.scale let targetSize = CGSize(width: itemSize.width * scale, height: itemSize.height * scale) - AlbumManager.imageManager.startCachingImages(for: self.allAssets, targetSize: targetSize, contentMode: .aspectFill, options: nil) - + DispatchQueue.global().async { + AlbumManager.imageManager.startCachingImages(for: self.allAssets, targetSize: targetSize, contentMode: .aspectFill, options: nil) + } } } @@ -233,7 +234,7 @@ extension LPAlbum: UICollectionViewDelegate, UICollectionViewDataSource { var newModel = model newModel.isSelect = !$0 self.albumModels = self.albumModels.change(assetModel: newModel) - self.collectionView.reloadItems(at: [indexPath]) + UIView.performWithoutAnimation { self.collectionView.reloadItems(at: [indexPath]) } } if #available(iOS 9.0, *) { guard traitCollection.forceTouchCapability == .available else { return cell } diff --git a/LPAlbum/Controllers/PhotosBrowerController.swift b/LPAlbum/Controllers/PhotosBrowerController.swift index e12e912..e40a473 100644 --- a/LPAlbum/Controllers/PhotosBrowerController.swift +++ b/LPAlbum/Controllers/PhotosBrowerController.swift @@ -24,12 +24,12 @@ class PhotosBrowerController: UIViewController { super.viewDidLoad() setupUI() refreshNavigation() - addCache() +// addCache() } deinit { print("\(self) deinit") - removeCache() +// removeCache() } } diff --git a/README.md b/README.md index e2c9da6..d4cca5c 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,8 @@ public extension LPAlbum { public static var normalBox: UIImage = Bundle.imageFromBundle("circle_normal")! /// 选中的选择框图片 public static var selectedBox: UIImage = Bundle.imageFromBundle("circle_selected")! + /// 选择框box的可点击区域向外的扩展size + public static var boxEdgeInsets = UIEdgeInsets(top: -5, left: -5, bottom: -5, right: -5) } } @@ -132,7 +134,7 @@ Specify LPAlbum into your project's Podfile: ```ruby # source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '8.0' +platform :ios, '9.0' use_frameworks! target '' do @@ -148,19 +150,6 @@ $ pod install ``` -### 2. Carthage - -[Carthage](https://github.com/Carthage/Carthage) is a simple, decentralized -dependency manager for Cocoa. - -Specify LPAlbum into your project's Carthage: - - -``` -github "loopeer/LPAlbum" ~> 1.0.1 - -``` -