UIBarButtonItem无法正确旋转

时间:2017-10-07 08:20:54

标签: objective-c ios11 uibarbuttonitem cgaffinetransform

此代码在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);
    }];

}

我该如何解决这个问题!

0 个答案:

没有答案