Reputation: 6051
I am trying to do something like this :
but can't find any post or tutorial , I would be thankful how can I turn an image to mirror like this ?
Upvotes: 1
Views: 113
Reputation: 1107
here is great library on github for doing this
https://github.com/nicklockwood/ReflectionView
Upvotes: 4
Reputation: 2741
You can set a UIView's transform property to flip it, like so:
// this sets the view's y scale to -1, flipping it vertically
label.transform = CGAffineTransformMakeScale(1, -1);
Details about this function and others like it can be found at the CGAffineTransform reference page.
My first instinct would be to make a duplicate of whatever view you want to mirror and transform it like this.
You can also 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
Upvotes: 1