UIView *view = [[UIView alloc] initWithFrame:CGRectMake(10, 10, 80, 80)]; view.layer.cornerRadius = 10; view.layer.masksToBounds = YES; view.layer.borderWidth = 1; view.layer.borderColor = [[UIColor colorWithRed:0.52 green:0.09 blue:0.07 alpha:1] CGColor];
IOS设置UIView的边框和圆角
iOS 系统自带的 View 组件都是正方形的,看起来都太生硬,有时候我需要加边框变成圆角形式,代码实现:
猜你喜欢
转载自iaiai.iteye.com/blog/2138827
今日推荐
周排行