iOS的label如何既有边框又有背景色
2017-03-22 本文已影响43人
坤哥lqk
UILabel *label = [[UILabel alloc] init];
label.backgroundColor = [UIColor redColor];
label.layer.borderColor = [[UIColor grayColor]CGColor];
label.layer.borderWidth = 0.5f;
label.layer.masksToBounds = YES;
label.layer.cornerRadius = 5
#import< QuartzCore/QuartzCore.h>