项目需求是一个圆角label,我设置了 Label.layer.cornerRadius = 3; 但是不行,后来一看文档,原来是UIVIew的
@property(nonatomic) BOOL clipsToBounds; // When YES, content and subviews are clipped to the bounds of the view. Default is NO.
设置为YES之后才是有效果的。在此谨记,没事过看看基础
项目需求是一个圆角label,我设置了 Label.layer.cornerRadius = 3; 但是不行,后来一看文档,原来是UIVIew的
@property(nonatomic) BOOL clipsToBounds; // When YES, content and subviews are clipped to the bounds of the view. Default is NO.