在我的应用程序中,我已经使用以下代码在解除我已推送到新视图的视图后实现,当我尝试实现视图时不会忽略它而是重叠。这是我的代码,
-(IBAction)selectExitingPicture
{
if([UIImagePickerController isSourceTypeAvailable:
UIImagePickerControllerSourceTypePhotoLibrary])
{
UIImagePickerController *picker= [[UIImagePickerController alloc]init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentViewController:picker animated:YES completion:nil];
}
}
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image
editingInfo:(NSDictionary *)editingInfo
{
[picker dismissViewControllerAnimated:YES completion:^{
cropingImageViewCon = [[CropingImageViewControl alloc]initWithNibName:@"CropingImageView" bundle:nil];
cropingImageViewCon.delegate = self;
cropingImageViewCon.originalImg = image;
[self.navigationController presentModalViewController:cropingImageViewCon animated:YES];
}];
}
我的代码出了什么问题,任何人都可以帮帮忙。
答案 0 :(得分:0)
如果你想进入CropingImageViewControl
那么你的方法就错了,
使用
[self.navigationController pushViewController:yourViewCotrollerObject animated:YES];
而不是使用presentModalViewController: