美文网首页
关于UIImagePickerController种种

关于UIImagePickerController种种

作者: 呆木大人 | 来源:发表于2017-02-22 12:09 被阅读36次

1设置照相机button为国际化

在info.plist中设置 localized resources can be mixed 为 yes 即可

2让照片始终竖着朝向自己,不知道在win上面是否管用

UIImage *image = info[@"UIImagePickerControllerOriginalImage"];

if (image.imageOrientation == UIImageOrientationLeft) {
    image = [UIImage imageWithCGImage:image.CGImage scale:1 orientation:UIImageOrientationLeft];
}else{
    image = [UIImage imageWithCGImage:image.CGImage scale:1 orientation:UIImageOrientationRight];
}

相关文章

网友评论

      本文标题:关于UIImagePickerController种种

      本文链接:https://www.haomeiwen.com/subject/njzpwttx.html