5
我想在用戶選擇圖像後從UIImagePickerController推視圖控制器(用於額外的編輯)。
它被成功推送。 但是,當視圖控制器彈出並且用戶返回到編輯屏幕時,編輯屏幕不再可交互。有誰知道是什麼問題。UIImagePickerController推送viewcontroller錯誤允許編輯
-(void)didTapBtn:(id)sender
{
self.picker = [[UIImagePickerController alloc] init];
self.picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
self.picker.delegate = self;
self.picker.allowsEditing = YES;
[self presentViewController:self.picker animated:YES completion:nil];
}
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage];
if (image == nil) {
image = [info objectForKey:UIImagePickerControllerOriginalImage];
}
if (image == nil) {
return;
}
self.test = [[BTTestViewController alloc] init];
self.test.delegate = self;
[self.picker pushViewController:self.test animated:YES];
}
//Called by BTTestViewController
-(void)didCancel
{
[self.picker popViewControllerAnimated:YES];
}
我想要的是,當用戶按取消,它會回到照片/相機屏幕。在你的方法中,選取器已被解僱。所以這不是我想要的。 – wjheng