FaceCollectionViewKit
A framework that lists all photos in the album that contain faces.
Features
- It uses the detection features of CIDetectorTypeFace.
- Scans all albums, presents you photos with face detected.
- The quality of the photos does not deteriorate.
- Detection settings can be changed.
- Caching photo asset workaround.
- Simple and fast.
Usage
Initialize
Firstly, use this wherever you want to show the album.
FaceCollectionViewKit.shared.initialize(for: YOUR_CUSTOM_VIEW)
Select Photo
This is triggered when you select a photo from the album, just call it once in viewDidLoad().
FaceCollectionViewKit.shared.imageSelected = { [weak self] image in
//whatever you would like to do.
}
Cache Sync
Use this when exiting the screen with the album. Saves cached images.
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
FaceCollectionViewKit.shared.sync()
}
Installation
CocoaPods
To integrate FaceCollectionViewKit into your Xcode project using CocoaPods, specify it in your Podfile:
pod 'FaceCollectionViewKit', :git => 'https://github.com/serhatakalin/FaceCollectionViewKit.git'
Carthage
To integrate FaceCollectionViewKit into your Xcode project using Carthage, specify it in your Cartfile:
pod 'serhatakalin/FaceCollectionViewKit'
Manually
Add the Core folder to your Xcode project.
License
FaceCollectionViewKit is released under the MIT license. See LICENSE for more information.