我正在使用此代码来制作自定义相机裁剪:
UIImagePickerController 编辑视图圆圈叠加
这在相机胶卷中效果很好,但不能拍照
如果我更改 [navigationController.viewControllers count] == 3 --> [navigationController.viewControllers count] == 1 也适用于相机,但不适用于下一个视图(您接受使用照片的预览视图)
谁来帮帮我??
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{
if (buttonIndex == 0) {
NSLog(@"Camara");
UIImagePickerController * imagePicker = [[UIImagePickerController alloc] init];
imagePicker.allowsEditing = YES;
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.delegate = self;
self.isCamera = YES;
[self presentViewController:imagePicker animated:YES completion:nil];
}else{
NSLog(@"Carrete");
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc]init];
imagePickerController.allowsEditing = YES;
imagePickerController.delegate = self;
imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
self.isCamera = NO;
[self presentViewController:imagePickerController animated:YES completion:nil];
}
Run Code Online (Sandbox Code Playgroud)
}
- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
if …Run Code Online (Sandbox Code Playgroud)