2015-10-29 3 views

ответ

2

Этот код поможет вам начать:

PHImageManager* manager = [PHImageManager defaultManager]; 
    PHVideoRequestOptions* requestOptions = [PHVideoRequestOptions new]; 
    requestOptions.networkAccessAllowed = YES; 
    requestOptions.progressHandler = ^(double progress, NSError* error, BOOL* stop, NSDictionary* info) { 
     NSLog(@"cacheAsset: %f", progress); 
    }; 
    [manager requestExportSessionForVideo:inAsset 
            options:requestOptions 
          exportPreset:AVAssetExportPresetPassthrough resultHandler:^(AVAssetExportSession* exportSession, NSDictionary* info) { 
           exportSession.outputURL = url; 
           exportSession.outputFileType = AVFileTypeQuickTimeMovie; 
           [exportSession exportAsynchronouslyWithCompletionHandler:^{ 
            // Do something here with the result. Make sure to check the info dictionary for additional status. 
           }]; 
          }];