第一步先添加框架:QuartzCore,frame
label.layer.cornerRadius = 10;
label.layer.masksToBounds = YES;
利用控件尺寸和圆角半径创建圆,半径为50的圆
Label.frame = CGRectMake(0,0,100,100);
label.layer.cornerRadius = 50;
label.layer.masksToBounds = YES;
时间: 2024-10-12 13:20:31
第一步先添加框架:QuartzCore,frame
label.layer.cornerRadius = 10;
label.layer.masksToBounds = YES;
利用控件尺寸和圆角半径创建圆,半径为50的圆
Label.frame = CGRectMake(0,0,100,100);
label.layer.cornerRadius = 50;
label.layer.masksToBounds = YES;