标签:
解决方法为
把函数名里所传需要的参数放到全局变量 即可
- (void)rotateWithSpeed:(CGFloat)spd { [UIView animateWithDuration:spd delay:0 options:UIViewAnimationOptionCurveLinear animations:^{ self.blade.transform = CGAffineTransformRotate(self.blade.transform, M_PI_2); } completion:^(BOOL finished){ if (finished) { [self rotateWithSpeed:spd]; } }]; }
换为
- (void)rotateWithSpeed { [UIView animateWithDuration:self.spd delay:0 options:UIViewAnimationOptionCurveLinear animations:^{ self.blade.transform = CGAffineTransformRotate(self.blade.transform, M_PI_2); } completion:^(BOOL finished){ if (finished) { [self rotateWithSpeed]; } }]; }
标签:
原文地址:http://www.cnblogs.com/aoxer/p/5117009.html