iOS开发实用技术

iOS -UIImagePickerController单独设置

2018-10-22  本文已影响174人  codemovie
UIImagePickerController *systemImagePicker = [[UIImagePickerController alloc]init];
    systemImagePicker.delegate = self;
    systemImagePicker.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera];
    systemImagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
    [self presentViewController:systemImagePicker animated:YES completion:nil];
UIImagePickerController *systemImagePicker = [[UIImagePickerController alloc]init];
    systemImagePicker.delegate = self;
    //systemImagePicker.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera];
    systemImagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
    systemImagePicker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;//设置摄像头捕获类型
    [self presentViewController:systemImagePicker animated:YES completion:nil];

转载一篇文章,关于UIImagePickerController讲的很全,作为记录:
UIImagePickerController

上一篇下一篇

猜你喜欢

热点阅读