Attributes-iOS初学
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
//获取可变attributes
NSMutableAttributedString *title = [[NSMutableAttributedString alloc]initWithString:self.outlineButton.currentTitle];
//设置attributes
[title setAttributes:@{NSStrokeWidthAttributeName:@3,
NSStrokeColorAttributeName:self.outlineButton.tintColor}
range:NSMakeRange(0, [title length])];
//attribute放回
[self.outlineButton setAttributedTitle:title forState:UIControlStateNormal];
}
@-3:描边+填充。