Objective c 我能按一下按钮吗?

Objective c 我能按一下按钮吗?,objective-c,uibutton,transform,Objective C,Uibutton,Transform,我对UIButton有些问题 在我的情况下,我必须水平翻转按钮 我试着把它的宽度改为负值。但它不起作用 我该怎么做呢?只需将其变换设置为CGAffineTransformMakeScale(-1.0,1.0)只需将其变换设置为CGAffineTransformMakeScale(-1.0,1.0)如果希望它水平旋转360度: [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.75]; // trans

我对UIButton有些问题

在我的情况下,我必须水平翻转按钮

我试着把它的宽度改为负值。但它不起作用


我该怎么做呢?

只需将其
变换设置为
CGAffineTransformMakeScale(-1.0,1.0)
只需将其
变换设置为
CGAffineTransformMakeScale(-1.0,1.0)
如果希望它水平旋转360度:

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.75]; // transition speed

[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.YourButton cache:NO];

[UIView commitAnimations];

如果希望它水平旋转360度:

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.75]; // transition speed

[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.YourButton cache:NO];

[UIView commitAnimations];