iphone – 如何获取动画结束通知

iphone – 如何获取动画结束通知,第1张

概述动画结束后,我想做一些动作. [UIView beginAnimations:nil context:NULL];[UIView setAnimationDuration:0.80f];self.view.transform = CGAffineTransformMakeTranslation( self.view.frame 动画结束后,我想做一些动作.

[UIVIEw beginAnimations:nil context:NulL];[UIVIEw setAnimationDuration:0.80f];self.vIEw.transform = CGAffinetransformMakeTranslation(                                 self.vIEw.frame.origin.x,480.0f + (self.vIEw.frame.size.height/2)  // move the whole vIEw offscreen                                 );[self.vIEw setAlpha:0];[UIVIEw commitAnimations];

我已经完成了上面的动画,如何找到动画结束,以便我可以在那之后做我的动作.

解决方法 用这个:

[UIVIEw animateWithDuration:0.80f animations:^{    self.vIEw.transform =    CGAffinetransformMakeTranslation(                                     self.vIEw.frame.origin.x,480.0f + (self.vIEw.frame.size.height/2)  // move the whole vIEw offscreen                                     );    [self.vIEw setAlpha:0];    }    completion:^(BOol finished){        // your code    }];
总结

以上是内存溢出为你收集整理的iphone – 如何获取动画结束通知全部内容,希望文章能够帮你解决iphone – 如何获取动画结束通知所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/1036359.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-24
下一篇2022-05-24

发表评论

登录后才能评论

评论列表(0条)

    保存