-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[self dismissViewControllerAnimated:YES completion:^
{
[self emailImage:image];
}
];
[picker release];
}
我是iOS新手,刚开始开发应用程序。我知道Swift语言,但我必须在Objective C中完成此操作。我无法解决此错误。
图像链接如下:
答案 0 :(得分:0)
使用此代码,
- (void)imagePickerController:(UIImagePickerController *)photoPicker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
NSString *mediaType;
mediaType = [info objectForKey:UIImagePickerControllerMediaType];
if ([mediaType isEqualToString:(NSString *)kUTTypeImage ])
{
UIImage * image = (UIImage*) [info objectForKey:UIImagePickerControllerEditedImage];
imageAddView.image = [UIImage squareImageWithImage:image scaledToSize:CGSizeMake(640, 640)];
[photoPicker dismissViewControllerAnimated:YES completion:NULL];
}
}
希望它有用
答案 1 :(得分:0)
你的代码应该是,
getFragmentManager.popBackStack();
希望这会有所帮助:)