开发者

Can I horizontal filp the UIButton?

开发者 https://www.devze.com 2023-04-07 23:48 出处:网络
I\'ve some problem with UIButton. In my case I have to fl开发者_运维知识库ip the button horizontally.

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];
0

精彩评论

暂无评论...
验证码 换一张
取 消