跟iPhone手机图标类似的控件抖动
2016-12-21 17:28
190 查看
- (void)shakeImage:(UIimageView *)image{//创建动画对象,绕Z轴旋转CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];//设置属性,周期时长[animation setDuration:0.15];//抖动角度animation.fromValue = @(-M_1_PI/10);animation.toValue = @(M_1_PI/10);//重复次数,无限大animation.repeatCount = HUGE_VAL;//恢复原样animation.autoreverses = YES;//锚点设置为图片中心,绕中心抖动image.layer.anchorPoint = CGPointMake(0.5, 0.5);[image.layer addAnimation:animation forKey:@"rotation"];}
相关文章推荐
- 实现类似iphone手机删除应用程序的抖动效果
- Expression Blend 的点滴(4)--创建类似iPhone屏幕锁控件(下)
- iOS获取手机型号,Swift获取手机型号(类似iphone 7这种,能取到具体型号)
- iPhone手机使用:手机应用更新之后,应用图标下面文字前边出现蓝色小圆点的去掉方法
- 如何实现桌面App图标可以动态显示消息数(类似手机上的QQ图标)?
- 苹果手机iPhone的一万个应用程序图标组成的iPhone手机, 美伦美奂,极度奢华!
- Expression Blend 的点滴(4)--创建类似iPhone屏幕锁控件(下)
- Expression Blend 的点滴(4)--创建类似iPhone屏幕锁控件(上)
- Blend学习(8) 创建类似iPhone屏幕锁控件(下)
- Android仿Iphone图标抖动效果
- QT绘制类似手机信号强度图标的实现源码
- 将一个view 的背景设为透明 但view上的图标 不透明 实现类似iphone ipad 主页的滑动效果
- javascript 仿iphone手机输入密码错误时抖动效果
- 如何实现桌面App图标可以动态显示消息数(类似手机上的QQ图标)?
- 类似长按图标抖动一样
- Android仿Iphone图标抖动效果
- 自绘手机震动图标,3个控件搞定
- Android 类似手机接收到短信桌面图标改变
- 如何在iPhone手机里创建网页快捷方式图标(Web Clip)
- 控件抖动配合手机震动