此代码在iOS 11之前正常运行,但在iOS 11上,旋转无法正常工作。
@property (strong, nonatomic) IBOutlet UIBarButtonItem *reloadBtn;
- (void)buttonRotate
{
UIView *view = [self.reloadBtn valueForKey:@"view"];
[UIView animateWithDuration:1.5 animations:^{
view.transform = CGAffineTransformMakeRotation(M_PI * 180 / 180.0);
view.transform = CGAffineTransformMakeRotation(M_PI * 360 / 180.0);
}];
}
我该如何解决这个问题!