views:

71

answers:

1

Any application can access the library and camera roll and get pictures from there. There's any equivalent way to get videos instead?

I mean, to show a list of all video files the user has on the device and let the user select one, playing that one after that?

thanks for any help!

+2  A: 

Do it the same way you do for photos. Checkout the UIImagePickerController docs. you just have to set the mediaTypes property properly.

UIImagePickerController *picker = [[[UIImagePickerController alloc] init] autorelease];
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
picker.mediaTypes = [NSArray arrayWithObject:kUTTypeMovie];
picker.delegate = self;
Squeegy
THANKS!!!! THAT'S IT! any way to do that on OS 2.x ?
Digital Robot
Devices that support video came out at the same time as OS 3.0. So if your device can do video, it can't be running 2.x. The ability to pick videos in this way was explicitly added to the 3.0 SDK. So no, you cannot do this in 2.x.
Squeegy