【代码笔记】iOS-伸缩式动画
2016-05-24 09:01
435 查看
一,效果图。
二,代码。
二,代码。
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.title=@"伸缩式动画"; } //点击任何处,弹出动画 -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UIView *zanView = [[UIView alloc] initWithFrame:CGRectMake(50, 100, 100, 100)]; zanView.backgroundColor = [UIColor redColor]; [self.view addSubview:zanView]; [UIView animateWithDuration:0.3 animations:^{ zanView.transform = CGAffineTransformMakeScale(1.2, 1.2); } completion:^(BOOL finished) { [UIView animateWithDuration:0.3 animations:^{ zanView.transform = CGAffineTransformMakeScale(0.9, 0.9); } completion:^(BOOL finished) { [UIView animateWithDuration:0.3 animations:^{ zanView.transform = CGAffineTransformMakeScale(1.0, 1.0); } completion:^(BOOL finished) { }]; }]; }]; }
相关文章推荐
- iOS_SourceTree忽略文件
- 600个开源iOS应用&库
- 【附Demo】iOS快速上手应用内购(IAP)
- ios 画图板
- iOS蓝牙开发(一)蓝牙相关基础知识
- ios宏的使用和技巧
- ios蓝牙开发(二)ios连接外设的代码实现
- IOS项目实战提升学员实操能力
- iOS开发用到的Mac系统资源库中各种文件的路径
- 爆炸!iOS资源大礼包(持续更新...)
- iOS项目中Info.plist文件是干什么的?
- Android IOS WebRTC 音视频开发总结(七二)-- 看到Google Duo,你想到了什么?
- iOS一个简单的点赞动画
- iOS 刷新控件下拉刷新崩溃问题
- IOS的APNS和PushKit门道详述
- IOS数据存储常用的5种方式
- 父子控制器
- IOS 多线程技术
- iOS - NSCalendar获得日期元素与时间的比较
- iOS开发示例————第三方框架MJRefresh简单使用