普通动画学习补强改进

来源:互联网 发布:js 数组 clear 编辑:程序博客网 时间:2024/05/16 06:21
重点:动画的学习这里特别学习第二种动画,了解第二种动画的重要性- (void) smallImg{    //第一种执行动画的方案    if(false){        //删除阴影        //面向对象,任何视图想从主视图中删除,都调用自己的方法,“只有自己才知道自己怎么死的”                //恢复图像原来位置        [UIView beginAnimations:nil context:nil];        [UIView setAnimationDuration:1];        self.cover.alpha = 0.0;        self.iconBtn.frame = CGRectMake(85, 85, 150, 150);        [UIView commitAnimations];                //[self.cover removeFromSuperview];        //self.cover = nil;    }        //第二种执行动画的方案,推荐    [UIView animateWithDuration:1.0 animations:^{            } completion:^(BOOL finished) {    }];}

0 0