ios - UIImagePickerControllerEditedImage 与图像选择器 View 中的图像不匹配

标签 ios image uiimage uiimagepickercontroller

我正在尝试使用 UIImagePickerController 的预览屏幕上显示的方形图像,但图像总是稍微向下推。

请看下面的图片。

enter image description here enter image description here

我有 imgPicker.allowsEditing = YES,这里是选择图像后的代码。

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    UIImage *imageEdited = [info objectForKey:UIImagePickerControllerEditedImage];
    self.imgView.image = imageEdited;
    [picker dismissViewControllerAnimated:YES completion:nil];

}

imgView 的尺寸为 320x320。

有什么建议吗?

最佳答案

我通过隐藏导航栏解​​决了同样的问题:

[navi setNavigationBarHidden:YES];

关于ios - UIImagePickerControllerEditedImage 与图像选择器 View 中的图像不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19742148/

相关文章:

ios - 我的 xamarin.ios 应用程序在 iPhone 上崩溃,但在模拟器上运行良好

ios - 如何通过以编程方式创建 UIImage 来更改 UITabBar 顶部边框的颜色?

c# - 我如何使用 ffmpeg 修复(组合 1 个音频和 1 个图像)

c# - 无法使用 WPF 在横向上打印我的位图

ios - 将 UIImage 调整为 200x200pt/px

iOS加入多张图片

iphone - 如何在 iOS 中插入和覆盖音频文件

ios - 从一个 View 到另一 View 更新标签内容

iphone - 将MBProgressHUD链接到我的项目

javascript - 通过JS解码UTF-8图像(字符串)