下面的属性声明了一个单例:
@property (nonatomic, copy) void (^onUpdate)();
类中开始这个单例之后:
[self.singleton.onUpdate = ^{
CGAffineTransform rot = CGAffineTransformMakeRotation(degreesToRadian(angle));
[UIView animateWithDuration:0.1 animations:^{
myself.object.transform = rot;
}];
}];
在最后一行报出expected identifier
错误。