我想以非阻塞方式动画缩放 UIView 及其所有内容。目前我这样做...
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.1];
[UIView setAnimationDelegate:self];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
CGAffineTransform transform = CGAffineTransformMakeScale(1.1,1.1);
self.view.transform = transform;
[UIView commitAnimations];
但是它正在阻塞。我宁愿使用类似...
[UIView animateWithDuration:0.2
animations:^{
CGAffineTransform transform = CGAffineTransformMakeScale(1.1,1.1);
self.view.transform = transform;
}];
...但 animateWithDuration 不适用于 CALayer/CGAffineTransform 转换。如何在不阻塞任何东西的情况下实现相同的动画?