Objective c 在UIView动画之间添加延迟

Objective c 在UIView动画之间添加延迟,objective-c,animation,delay,Objective C,Animation,Delay,我在UIView的touchesBegind方法中有一些操作和动画,我在视图中将其子类化并附加为类。 我需要一些动画之间的延迟 代码: 这是基本的想法 谢谢。您可以使用基于块的UiView动画: [UIView animateWithDuration:0.4 animations:^{ //Your first anim here } completion:^(BOOL finished){ //Your second anim here }]; 可以使用基于块的UiView动

我在UIView的touchesBegind方法中有一些操作和动画,我在视图中将其子类化并附加为类。 我需要一些动画之间的延迟

代码:

这是基本的想法


谢谢。

您可以使用基于块的UiView动画:

[UIView animateWithDuration:0.4 animations:^{
    //Your first anim here
} completion:^(BOOL finished){
    //Your second anim here
}];

可以使用基于块的UiView动画执行此操作:

[UIView animateWithDuration:0.4 animations:^{
    //Your first anim here
} completion:^(BOOL finished){
    //Your second anim here
}];

你也可以在你的方法中使用

[self performSelector:@selector(animateCardSize) withObject:nil afterDelay:(2.0f)];
//2.0 and animateCardSize as examples

你也可以在你的方法中使用

[self performSelector:@selector(animateCardSize) withObject:nil afterDelay:(2.0f)];
//2.0 and animateCardSize as examples

Thanx注释我有一个基于块的动画用于调整大小,所以我在完成代码中添加了第二个翻转动画,解决了一个问题。在动画开始之前和通知之前,我需要的触摸延迟如何?Thanx评论我有一个基于块的动画用于调整大小,因此我在完成代码中添加了第二个翻转动画,解决了一个问题。在动画开始之前和通知之前,我需要的触摸延迟是什么?