星空网 > 软件开发 > 操作系统

iOS 简单动画 block动画

 1 - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{ 2   UIView * view = [[UIView alloc]initWithFrame:CGRectMake(100, 100, 100, 100)]; 3   view.backgroundColor = [UIColor orangeColor]; 4   view.alpha = 1; 5   [self.view addSubview:view]; 6   //动画持续时间为五秒 7   [UIView animateWithDuration:5 animations:^{ 8     view.alpha = 0; 9   }completion:^(BOOL finished) {//当动画结束后进行的操作10     //动画时间为一秒11     [UIView animateWithDuration:1 animations:^{12       view.alpha = 1;13     } completion:^(BOOL finished) {14       view.backgroundColor = [UIColor blueColor];15     }];16   }];17 }

 




原标题:iOS 简单动画 block动画

关键词:IOS

IOS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

泰国海外仓库:https://www.goluckyvip.com/tag/90036.html
到泰国留学的条件:https://www.goluckyvip.com/tag/90037.html
去泰国旅行:https://www.goluckyvip.com/tag/90038.html
泰国曼谷最大进出口港口:https://www.goluckyvip.com/tag/90039.html
箱包行业趋势:https://www.goluckyvip.com/tag/9004.html
泰国中转仓:https://www.goluckyvip.com/tag/90040.html
无锡旅游景点竹海 - 无锡的竹海:https://www.vstour.cn/a/363178.html
5月贾汪好玩的地方 贾汪哪有好玩的地方:https://www.vstour.cn/a/363179.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流