有时候我们需要把图片、textview等view设置成圆角:
需要Core Graphics框架
头文件:
#import <QuartzCore/QuartzCore.h>
code:
view.layer.borderWidth = 1;
view.layer.cornerRadius = 6;
view.layer.masksToBounds = YES;
时间: 2024-10-13 16:05:21
有时候我们需要把图片、textview等view设置成圆角:
需要Core Graphics框架
头文件:
#import <QuartzCore/QuartzCore.h>
code:
view.layer.borderWidth = 1;
view.layer.cornerRadius = 6;
view.layer.masksToBounds = YES;