实现类似iphone手机删除应用程序的抖动效果
来源:互联网 发布:广联达计价软件购买 编辑:程序博客网 时间:2024/05/22 10:53
其实原理很简单,让图片向左,再向右旋转一定角度就可以啦
static BOOL wobblesLeft = NO;
UIButton * button=[UIButton buttonWithType:UIButtonTypeCustom];
[button setImage:[UIImage imageNamed:@"宝宝日记_1.png"] forState:UIControlStateNormal];
button.frame=CGRectMake(10, 10, 40, 40);
CGFloat rotation=(3*M_PI)/180;
CGAffineTransform wobbleLeft=CGAffineTransformMakeRotation(rotation);
CGAffineTransform wobbleRight=CGAffineTransformMakeRotation(-rotation);
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.2];
[UIView setAnimationDelegate:self];
[UIView setAnimationRepeatCount:999999999];
button.transform = wobblesLeft ? wobbleRight : wobbleLeft;
wobblesLeft = !wobblesLeft;
[UIView commitAnimations];
[self.view addSubview:button];
- 实现类似iphone手机删除应用程序的抖动效果
- 跟iPhone手机图标类似的控件抖动
- Android手机震动抖动效果的实现
- 使用UICollectionView实现应用程序管理(删除图标 抖动效果)
- 用CSS3实现类似苹果桌面的有趣抖动效果
- JavaScript实现的类似腾讯QQ聊天窗口抖动效果
- IOS 实现类似桌面删除应用程序的效果(长按 可编辑 删除 图片按比例截取)
- 类似QQ的窗口抖动效果
- iOS--实现UIView的抖动效果-类似Mac上密码输入错误效果
- javascript 仿iphone手机输入密码错误时抖动效果
- 类似QQ的抖动窗体的实现
- 类似iphone的短消息效果
- 窗口抖动效果的实现
- iphone实现类似Android Grid效果的列表视图
- 自定义view类之实现Iphone类似的boundview效果
- WINCE下实现类似iphone滑动效果
- Android实现类似QQ的滑动删除效果
- Android实现类似QQ的滑动删除效果
- 【FBS外汇公司】通胀数据降低,美联储量化宽松预期升温
- 【FBS外汇公司】通胀数据降低,美联储量化宽松预期升温
- ExtJs grid 的属性
- 将网址制成链接
- 面试题之用伪代码设计缓存
- 实现类似iphone手机删除应用程序的抖动效果
- 雷锋读图:50PB的大数据到底是什么概念?
- word中解决段落右边无法对齐和编号左对齐
- 细说 fjsfl
- 宏与内联函数的区别
- kettle 循环实现方式
- Linux USB驱动工作流程
- How to change the Text color of Menu item in Android?
- 序列化与反序列化