您的位置:首页 > 其它

图片圆角处理

2014-03-20 19:24 211 查看


手动


ios学习笔记 图片边框处理

2012-09-22 14:06
ios 按钮或图片框圆角处理
图片框圆角处理(UIImageView):
导入库头文件(重点)

#import <QuartzCore/QuartzCore.h>
//圆角设置
imageView.layer.cornerRadius = 6;
imageView.layer.masksToBounds = YES;



//边框宽度及颜色设置
[imageView.layer setBorderWidth:2];
[imageView.layer setBorderColor:[UIColor blueColor]]; //设置边框为蓝色
//自动适应,保持图片宽高比
imageView.contentMode = UIViewContentModeScaleAspectFit;

ios学习笔记 图片边框处理


2012-09-22 14:06
ios 按钮或图片框圆角处理
图片框圆角处理(UIImageView):
导入库头文件(重点)

#import <QuartzCore/QuartzCore.h>
//圆角设置
imageView.layer.cornerRadius = 6;
imageView.layer.masksToBounds = YES;



//边框宽度及颜色设置
[imageView.layer setBorderWidth:2];
[imageView.layer setBorderColor:[UIColor blueColor]]; //设置边框为蓝色
//自动适应,保持图片宽高比
imageView.contentMode = UIViewContentModeScaleAspectFit;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: