OSX中转旋图片代码,
来源:互联网 发布:网络运营学徒是真的吗 编辑:程序博客网 时间:2024/04/28 16:40
以下是OSX中转旋图片代码,注意要将要旋转的图层勾选上:
spinButton.hidden =NO;
[CATransaction begin];
[CATransactionsetValue:(id)kCFBooleanTrueforKey:kCATransactionDisableActions];
CGRect frame = [spinButtonframe];
spinButton.layer.anchorPoint = CGPointMake(0.5,0.5);
spinButton.layer.position =CGPointMake(frame.origin.x +0.5 * frame.size.width, frame.origin.y +0.5 * frame.size.height);
[CATransactioncommit];
[CATransactionbegin];
[CATransactionsetValue:(id)kCFBooleanFalseforKey:kCATransactionDisableActions];
[CATransactionsetValue:[NSNumbernumberWithFloat:1.5]forKey:kCATransactionAnimationDuration];
CABasicAnimation *animation;
animation = [CABasicAnimationanimationWithKeyPath:@"transform.rotation.z"];
animation.fromValue = [NSNumbernumberWithFloat:0.0];
animation.toValue = [NSNumbernumberWithFloat:2 *M_PI];
animation.timingFunction = [CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionLinear];
animation.delegate =self;
[spinButton.layeraddAnimation:animation forKey:@"rotationAnimation"];
[CATransactioncommit];
- OSX中转旋图片代码,
- node中转图片上传
- Chromium代码:实现GPU->GPU的直接图片传递,不需要通过CPU进行中转
- java中转换ascii代码
- 中转
- OSX文本编辑器代码
- OSX下代码压缩文件
- nodejs 服务器作防盗链图片中转
- oracle 数据库表中转换成java代码
- osx Application代码实现NSMenu
- 使用GDI+在内存中转换图片类型
- 使用GDI+在内存中转换图片类型
- 使用GDI+在内存中转换图片类型
- 使用GDI+在内存中转换图片类型
- 使用GDI+在内存中转换图片类型
- 【实用代码】C#中转换全半角字符的函数
- Stateflow中转换多个事件触发的状态机HDL生成代码
- Java代码中转码 中文字符转UTF-8编码
- Java开发中的23种设计模式详解
- Java CountDownLatch类的使用
- 使用参数innodb_file_per_table支持MySQL InnoDB表数据共享空间自动收缩
- Oracle INSERT WITH CHECK OPTION的用法
- java基础加强_01_Java 1.5 新特性
- OSX中转旋图片代码,
- 上海泛道信息科技有限公司——整合营销专家
- 微信公众平台搭建第二步:成为开发者
- CMS系统分页的自己的心得
- 史上最完整的iOS DIY framework 详细教程(二)
- 数据结构与算法练习
- 黑马程序员之java开发前奏
- 在HTML中使用SVG
- 黑马程序员 Java基础<一>面向对象与类概述