UILabel * label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
label.layer.cornerRadius=label.bounds.size.width/2;
label.layer.masksToBounds=YES;
即可切成一个圆形
UILabel * label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
label.layer.cornerRadius=label.bounds.size.width/2;
label.layer.masksToBounds=YES;
即可切成一个圆形
本文标题:iOS中如何切割一个label成圆形
本文链接:https://www.haomeiwen.com/subject/xngzkttx.html
网友评论