tags:

views:

23

answers:

1

hi all, I want to create an mirror image of label or say any control and display the same on the view.Is there any way to create mirror image of label text or say button text? thanks in advance...

A: 

Assuming you're working in iOS, 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. If it's a button, of course disable interaction with the copy.

zem