2013-06-20 65 views
1

我试图做这样的事情:的UIImageView镜像

enter image description here ,但无法找到任何文章或教程,我怎么可以把图像镜像这样我会很感激?

+0

使用CoreGraphics中来acheve这在github上大图书馆。 –

回答

1

您可以设置一个UIView的变换属性,将其翻转,就像这样:这个功能

// this sets the view's y scale to -1, flipping it vertically 
label.transform = CGAffineTransformMakeScale(1, -1); 

细节和其它喜欢的话可以在CGAffineTransform参考页中找到。

我的第一个直觉是将你想要镜像的任何视图复制,并像这样转换它。

您还可以reffer

http://aptogo.co.uk/2011/08/no-fuss-reflections/ http://developer.apple.com/library/ios/#samplecode/Reflection/Introduction/Intro.html#//apple_ref/doc/uid/DTS40008063