Skip to content

Instantly share code, notes, and snippets.

@mrsidique
Created September 11, 2012 11:06
Show Gist options
  • Save mrsidique/3697618 to your computer and use it in GitHub Desktop.
Save mrsidique/3697618 to your computer and use it in GitHub Desktop.
mediaType = @"video";
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
[picker setVideoQuality:UIImagePickerControllerQualityTypeLow];
//Maximum video length
[picker setVideoMaximumDuration:10];
picker.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil];
picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModeVideo;
[self presentViewController:picker animated:YES completion:nil];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment