设置动画,旋转
来源:互联网 发布:seo外包收费标准 编辑:程序博客网 时间:2024/06/06 11:34
CGRect frame = self.imageView.frame;
// 创建临时的图片,保留原图。一定要<span style="font-family: Menlo; font-size: 18px; color: rgb(187, 44, 162);">self</span><span style="font-family: Menlo; font-size: 18px;">.</span><span style="font-family: Menlo; font-size: 18px; color: rgb(79, 129, 135);">imageView</span><span style="font-family: Menlo; font-size: 18px;">.</span><span style="color: rgb(112, 61, 170); font-family: Menlo; font-size: 18px;">userInteractionEnabled</span><span style="font-family: Menlo; font-size: 18px;"> = </span><span style="font-family: Menlo; font-size: 18px; color: rgb(187, 44, 162);">YES</span><span style="font-family: Menlo; font-size: 18px;">;</span><div><span style="color: #000000"></span></div> UIImageView* tempImageView = [[UIImageView alloc]initWithFrame:frame]; tempImageView.image = [UIImage imageNamed:@"1.jpg"]; [self.view addSubview:tempImageView];
// 缩小 CGAffineTransform transform = CGAffineTransformMakeScale(0.1, 0.1);
// 顺时针旋转,这里有位置变化,还没有想到在这个过程中旋转2周,现在是右转约半周 transform = CGAffineTransformRotate(transform, M_PI*1.99/2);
// 设置目的地为右下角 CGPoint center = CGPointMake(self.view.bounds.size.width, self.view.bounds.size.height); [UIView animateWithDuration:2 delay:0 usingSpringWithDamping:1 initialSpringVelocity:3 options:0 animations:^{ tempImageView.transform = transform; tempImageView.center = center; } completion:^(BOOL finished){ [tempImageView removeFromSuperview]; }];
0 0
- 设置动画,旋转
- Swift 旋转动画 (设置的ImageView的旋转动画)
- android RotateAnimation设置中心点旋转动画
- android RotateAnimation设置中心点旋转动画
- 旋转动画
- 旋转动画
- 动画旋转
- 旋转动画
- 旋转动画
- 旋转动画
- 旋转动画
- 旋转动画
- 旋转动画
- 旋转动画
- 属性动画中scale的时候设置旋转中心点
- Andriod 旋转动画RotateAnimation设置无限循环播放
- 安卓xml文件中设置动画匀速旋转无效?
- 动画之旋转动画
- js中利用isNaN函数判断用户输入是否为数字
- Linux下Oracle 10G手工建库
- 基于lucene.net 和ICTCLAS2014的站内搜索的实现2
- iOS-runtime
- 【产品】百度广告--动态创意。
- 设置动画,旋转
- 封装篇
- android开发学习笔记前瞻
- 输入星期几输出对应的英文
- Normalized cuts and image segmentation
- Oracle11G 初始化脚本
- 【&&】 0525_1001.Scenic Popularity Astar第二战_Failed
- 物联网、云计算:重新定义企业安全
- 九度 题目1352:和为S的两个数字