
- (int) MetadataOrIEntationForUIImageOrIEntation:(UIImageOrIEntation)orIEntation{ switch (orIEntation) { case UIImageOrIEntationUp: // the picture was taken with the home button is placed right return 1; case UIImageOrIEntationRight: // bottom (portrait) return 6; case UIImageOrIEntationDown: // left return 3; case UIImageOrIEntationleft: // top return 8; default: return 1; }}解决方法 要覆盖所有这些,并且没有幻数分配(CGImagePropertyOrIEntation的原始值可能在将来发生变化,虽然它不太可能……仍然是一个好习惯)你应该包括ImageIO框架并使用实际的常量: @H_301_7@ @H_301_7@ #import <ImageIO/ImageIO.h>- (CGImagePropertyOrIEntation)CGImagePropertyOrIEntation:(UIImageOrIEntation)orIEntation{ switch (orIEntation) { case UIImageOrIEntationUp: return kCGImagePropertyOrIEntationUp; case UIImageOrIEntationUpMirrored: return kCGImagePropertyOrIEntationUpMirrored; case UIImageOrIEntationDown: return kCGImagePropertyOrIEntationDown; case UIImageOrIEntationDownMirrored: return kCGImagePropertyOrIEntationDownMirrored; case UIImageOrIEntationleftMirrored: return kCGImagePropertyOrIEntationleftMirrored; case UIImageOrIEntationRight: return kCGImagePropertyOrIEntationRight; case UIImageOrIEntationRightmirrored: return kCGImagePropertyOrIEntationRightmirrored; case UIImageOrIEntationleft: return kCGImagePropertyOrIEntationleft; }} 总结 以上是内存溢出为你收集整理的ios – UIDmageOrientation到CIDetectorImageOrientation全部内容,希望文章能够帮你解决ios – UIDmageOrientation到CIDetectorImageOrientation所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)