IOS How to export movie to camera roll

/* Export movie to camera roll */
- (void) saveVideoToAlbum:(NSString*)path {
   
    if(UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(path)){
        UISaveVideoAtPathToSavedPhotosAlbum (path, self, @selector(video:didFinishSavingWithError: contextInfo:), nil);
    }
}
/* Call when finished save to camera */
- (void) video:(NSString *)videoPath didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo {
    if(error) {
        UIAlertView *alertview = [[UIAlertView alloc] initWithTitle:@"Warning"
                                                            message:[error description]
                                                           delegate:self
                                                  cancelButtonTitle:@"OK"
                                                  otherButtonTitles:nil];
        [alertview show];
        [alertview release];
       
    } else {
        NSLog(@"Export done");
       
    }
}

Comments

Popular posts from this blog

Java : Variables Declaring

Install DNF in RHEL/CentOS 7

SQL Self JOIN