UIView 自带动画
2016-03-04 00:00
435 查看
第一种方式
第二种方式
第三种方式
[UIView beginAnimations:nil context:nil]; //设置动画时间 [UIView setAnimationDuration:1]; view.backgroundColor = [UIColor cyanColor]; [UIView commitAnimations];
第二种方式
[UIView animateWithDuration:1 animations:^{ //在这个代码内,写动画效果 view.transform = CGAffineTransformMakeRotation(M_PI_2); }];
第三种方式
[UIView animateWithDuration:2 animations:^{ view.transform = CGAffineTransformMakeScale(1,1); } completion:^(BOOL finished) { //当动画执行结束的时候,执行这个代码块 NSLog(@"动画结束了,调用了这个代码块"); }];
相关文章推荐
- UI-Navigation 和 UITabBar Controller 标题问题
- 报名南京设计培训学UI后就业怎样?
- MySQL启动异常Starting MySQL.The server quit without .
- iOS uitableview中cell的分割线紧贴左边
- xib,storyboard的 issue
- UILable“中文”加上“英文或者其他非中文字符”自动换行的问题
- iOS UITabBar 详解
- UISrollView使用autolayout
- UI控件--UIButton
- 设置UIView四个角中任意角的圆角效果
- ABP理论学习之Swagger UI集成
- UGUI的事件系统分析
- questions
- Longest Collatz sequence
- easyui主界面生成分析2
- 错误记录:this.requestWindowFeature(Window.FEATURE_NO_TITLE)报错或没效果
- ios自定义UITabBar-仿写掌上英雄联盟的UITabBar
- Android自定义UI的实现和应用
- 唯一性索引(Unique Index)与普通索引(Normal Index)性能差异
- 关于Java类中 SUID (serialVersionUID)的解释