我知道在Objective-C中有几种延迟行动的方法,比如:
performSelector:withObject:afterDelay:
或者使用NSTimer
.
但是有一种叫做"积木"的奇特的东西,你可以在那里做这样的事情:
[UIView animateWithDuration:1.50 delay:0 options:(UIViewAnimationOptionCurveEaseOut|UIViewAnimationOptionBeginFromCurrentState) animations:^{
}completion:^(BOOL finished){
}];
不幸的是,这种方法只适用于设置动画.
我怎样才能在one method中创建一个延迟块,这样我就不必使用所有的@selectors
个块,而不需要创建new separate method个块?谢谢