CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.
TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Nov 2016 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by zzltjnh.
Keyframe image generateor and picker from a video like iPhone photo library written in Swift.
To run the example project, clone the repo, open KeyframePicker.xcworkspace
from root directory.
KeyframePicker is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'KeyframePicker'
import KeyframePicker
// get storyboard
let storyBoard = UIStoryboard(name: "KeyframePicker", bundle: Bundle(for: KeyframePickerViewController.self))
// init
let keyframePicker = storyBoard.instantiateViewController(withIdentifier: String(describing: KeyframePickerViewController.self)) as! KeyframePickerViewController
// set `asset` if your video from photolibrary or camera
// set `videoPath` if your video from sand box or remote
keyframePicker.asset = yourAvAsset
// set handler
keyframePicker.generatedKeyframeImageHandler = { [weak self] image in
if let image = image {
print("generate image success")
} else {
print("generate image failed")
}
}
// show
self?.navigationController?.pushViewController(keyframePicker, animated: true)
Zhilong Zhang,Tianjin China, [email protected]
KeyframePicker is available under the MIT license. See the LICENSE file for more info.