iOS点击button放大后缩小效果
2017-08-25 17:53
393 查看
转载请注明出处:http://blog.csdn.net/chen_gp_x
-(void)buttonClick{
button.transform = CGAffineTransformIdentity;
[UIView animateKeyframesWithDuration:0.5 delay:0 options:0 animations: ^{
[UIView addKeyframeWithRelativeStartTime:0 relativeDuration:1 / 3.0 animations: ^{
button.transform = CGAffineTransformMakeScale(1.5, 1.5);
}];
[UIView addKeyframeWithRelativeStartTime:1/3.0 relativeDuration:1/3.0 animations: ^{
button.transform = CGAffineTransformMakeScale(0.8, 0.8);
}];
[UIView addKeyframeWithRelativeStartTime:2/3.0 relativeDuration:1/3.0 animations: ^{
button.transform = CGAffineTransformMakeScale(1.0, 1.0);
}];
} completion:nil];
}
-(void)buttonClick{
button.transform = CGAffineTransformIdentity;
[UIView animateKeyframesWithDuration:0.5 delay:0 options:0 animations: ^{
[UIView addKeyframeWithRelativeStartTime:0 relativeDuration:1 / 3.0 animations: ^{
button.transform = CGAffineTransformMakeScale(1.5, 1.5);
}];
[UIView addKeyframeWithRelativeStartTime:1/3.0 relativeDuration:1/3.0 animations: ^{
button.transform = CGAffineTransformMakeScale(0.8, 0.8);
}];
[UIView addKeyframeWithRelativeStartTime:2/3.0 relativeDuration:1/3.0 animations: ^{
button.transform = CGAffineTransformMakeScale(1.0, 1.0);
}];
} completion:nil];
}
相关文章推荐
- iOS点击button放大后缩小效果,类似QQ、微信选择图片时的特效。
- iOS点击button放大后缩小效果
- iOS中给自定义tabBar的按钮添加点击放大缩小的动画效果
- 猫猫学IOS(二)UI之button操作 点击变换 移动 放大缩小 旋转
- [置顶] ios 网页中图片点击放大效果demo
- 利用iOS的UICollectionView制作卡片翻页放大缩小效果
- ios 图片放大缩小动画效果
- iOS 在tableView上添加button导致按钮没有点击效果和不能滑动的 zhuang
- IOS-UIBarButtonItem的图片文字点击效果
- iOS实现点击微信头像(放大、缩放、保存)效果
- iOS - 关于 Cell 上 Button 点击效果 Cell添加Button点击无效果处理
- iOS 图片捏合放大缩小 点击放大缩小
- highslide使用实例,点击图片放大效果,再次点击缩小
- android点击效果,圆放大缩小,类似水波纹的效果
- iOS中用按钮NSbutton实现视图的放大与缩小功能
- ios 图片放大缩小动画效果
- IOS ScrollView放大缩小点击位置并居中
- iOS 在tableView上添加button导致按钮没有点击效果和不能滑动的问题
- IOS-通过StortBoard设置Button点击效果
- IOS 自定义UIBUTTON 直接拖个xib 就能在button上显示多行文本 并且添加了点击的效果