我已经尝试过解除UIImagePickerController而没有任何运气的各种变体。我做错了什么。
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo{
[picker.parentViewController dismissViewControllerAnimated:YES completion:nil];
imageview.image = image;
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
[picker.parentViewController dismissViewControllerAnimated:NO completion:nil];
}
我不知道我在哪里做错了我在iOS 7上毁了这个。任何人都可以建议我做正确的方法吗?
答案 0 :(得分:2)
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
[self dismissViewControllerAnimated:NO completion:nil];
}
答案 1 :(得分:2)
将self
置于当前UIImagePickerController
[self dismissViewControllerAnimated:NO completion:nil];
答案 2 :(得分:1)
试试这个
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
[picker dismissViewControllerAnimated:YES completion:nil];
}