您的位置:首页 > 其它

判断当前的动画已经完成,以便进行后记的动作

2011-09-10 23:51 225 查看
参考代码:

[UIView beginAnimations:@"animationID" context:nil];

[UIView setAnimationDuration:0.3];

[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

[UIView setAnimationRepeatAutoreverses:NO];

m_image.frame = CGRectMake(0, 0, 1024, 768);

[UIView setAnimationDelegate:self];//设置动画的委托

[UIView commitAnimations];//开始动画

动画的委托并不多。

//动画结束后调用的函数

- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag

{

  for(UIView *m_view in [self.view subviews])

  {

     if ([m_view isKindOfClass:[UIImageView class]])

    {

       [m_view removeFromSuperview];

    }

  }

}

THE END !
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐