0

I have a video recorded output and I want to pass to other tabview controller. Below is my code

dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(queue, ^{

    ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init];
    [assetLibrary writeVideoAtPathToSavedPhotosAlbum:recordedFile
                                     completionBlock:
     ^(NSURL *assetURL, NSError *error) {

         dispatch_async(dispatch_get_main_queue(), ^{



             NSString *title;
             NSString *message;

             if (error != nil) {

                 title = @"Failed to save video";
                 message = [error localizedDescription];
             }
             else {
                 title = @"Saved!";
                 message = nil;
             }

             UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title
                                                             message:message
                                                            delegate:nil
                                                   cancelButtonTitle:@"OK"
                                                   otherButtonTitles:nil];
             [alert show];
      });
     }];
});
}  

please help me out I am very new to the objective c,send me code please

0 Answers0