在UIImageView中旋转图像代码例子

2015-11-04 0 665
在UIImageView中旋转图像代码例子
// 创建UIImage对象
UIImage *image = [UIImage imageNamed:@"sample.png"];

// 创建UIImageView
UIImageView *imageView = [ [ UIImageView alloc ] initWithFrame:CGRectMake(0.0, 0.0, image.size.width, image.size.height) ];
imageView.image = image;
[self addSubview:imageView];

// 旋转
CGAffineTransform rotate = CGAffineTransformMakeRotation( 1.0 / 180.0 * 3.14 );
[imageView setTransform:rotate];

遇见资源网 objective-c 在UIImageView中旋转图像代码例子 http://www.ox520.com/18126.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务