Can I horizontal filp the UIButton?
I've some problem with UIButton.
In my case I have to fl开发者_运维知识库ip the button horizontally.
I tried it's width to minus value. But it doesn't work.
How can I do this?
Simply set its transform
to CGAffineTransformMakeScale(-1.0, 1.0)
.
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];
精彩评论