views:

78

answers:

1

Hey, I know that when a user selects a Video I do get a URL for the video.... but can you direct me to a proper implementation because my App just sticks there when I click choose in the simulator and I cannot navigate away from the Video Player page.... Any good tutorial on this?

A: 

Once you select the video - execution flows to the following function:

(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info

{

.... code here .....

//get the videoURL NSString* videoURL= [info objectForKey:UIImagePickerControllerMediaURL];

//IMPORTANT: remember to test that the video is compatible for saving to the photos album

UISaveVideoAtPathToSavedPhotosAlbum(videoURL, self, @selector(video:didFinishSavingWithError:contextInfo:), nil);

.... code here .....

}

Take a look into 'UISaveVideoAtPathToSavedPhotosAlbum' specifically. This allows saving to the camera roll.

Lance
Please flag this as the correct answer: this place is give and take.
Lance