Ios UIImagePickerController使用AllowsEdit推送viewcontroller错误

Ios UIImagePickerController使用AllowsEdit推送viewcontroller错误,ios,Ios,在用户选择图像后,我试图从UIImagePickerController推送视图控制器(用于额外编辑)。 它被成功推送。 但是,当视图控制器弹出并且用户返回编辑屏幕时,编辑屏幕不再是可交互的。有人知道问题出在哪里吗 -(void)didTapBtn:(id)sender { self.picker = [[UIImagePickerController alloc] init]; self.picker.sourceType

在用户选择图像后,我试图从UIImagePickerController推送视图控制器(用于额外编辑)。
它被成功推送。 但是,当视图控制器弹出并且用户返回编辑屏幕时,编辑屏幕不再是可交互的。有人知道问题出在哪里吗

    -(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];
        }

在我的应用程序中尝试此项:

   UIImagePickerController *imagePicker;//put it in .h file

 put it in .m file 
       imagePicker = [[UIImagePickerController alloc]init];
       imagePicker.delegate = self;

        if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
        {
             imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
             imagePicker.allowsEditing = YES;
              [self presentViewController:imagePicker animated:YES completion:nil];
        }
        else
        {
              UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"STEP-BY-STEP-STORY!" message: @"Camera is not available" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
              [alert show];

        }

     - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
         {
           UIImage *pickedImage = [info objectForKey:UIImagePickerControllerEditedImage];
           imageData.image =[self resizeImage:imageData.image width:200 height:200];
            [picker dismissViewControllerAnimated:YES completion:nil];

           iphone_filtersViewController *nav=[[iphone_filtersViewController alloc]initWithNibName:@"iphone_filtersViewController" bundle:nil];
           [self.navigationController pushViewController:nav animated:YES];

      }
      - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
      {
        // release Picker
         [picker dismissViewControllerAnimated:YES completion:nil];
      }

    // iphone_filtersViewController method
      -(IBAction)backButton
        {
           [self.navigationController popViewControllerAnimated:YES];
        }

可能会有帮助。

我想要的是,当用户按“取消”时,它将返回到照片/相机屏幕。在您的方法中,选择器已被解除。所以这不是我想要的。