Reputation: 1321
I've some problem with UIButton.
In my case I have to flip the button horizontally.
I tried it's width to minus value. But it doesn't work.
How can I do this?
Upvotes: 1
Views: 624
Reputation: 19267
If you want it to rotate 360 degrees horizontally:
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.75]; // transition speed
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.YourButton cache:NO];
[UIView commitAnimations];
Upvotes: 3
Reputation: 25144
Simply set its transform
to CGAffineTransformMakeScale(-1.0, 1.0)
.
Upvotes: 4