Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 1.01 KB

README.md

File metadata and controls

49 lines (34 loc) · 1.01 KB

QDLivePhotoKit

Generate Live Photo from mp4 file

Installation

CocoaPods

The preferred installation method is with CocoaPods. Add the following to your Podfile:

pod 'QDLivePhotoKit', '~> 0.1.0'

Usage

Get the file as AVURLAsset

[[QDLivePhotoManager sharedManager] saveLivePhotoWithAsset:urlAsset completionHandler:^(BOOL success) {
        
    if (success) {
        NSLog(@"success");
        
    } else {
        NSLog(@"fail");
    }
}];

Get the file path

you must have the authority to access the file with path

[[QDLivePhotoManager sharedManager] saveLivePhotoWithPath:path completionHandler:^(BOOL success) {
        
    if (success) {
        NSLog(@"success");
        
    } else {
        NSLog(@"fail");
    }
}];

Requirements

iOS9.1 or later. Requires ARC

License

QDLivePhotoKit is released under the MIT license. See LICENSE for details.