如何水平翻转UIImage? [英] How to flip UIImage horizontally?
本文介绍了如何水平翻转UIImage?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何横向翻转 UIImage
,我在 UIImage中找到
类引用,如何使用此属性来翻转 UIImageOrientationUpMirrored
枚举值 UIImage
。
How to flip the UIImage
horizontally, I found UIImageOrientationUpMirrored
enumeration value in the UIImage
class reference, how to make use of this property to flip UIImage
.
推荐答案
UIImage* sourceImage = [UIImage imageNamed:@"whatever.png"];
UIImage* flippedImage = [UIImage imageWithCGImage:sourceImage.CGImage
scale:sourceImage.scale
orientation:UIImageOrientationUpMirrored];
这篇关于如何水平翻转UIImage?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文