代码(给所选文字加一个轮廓的button):
@property (weak, nonatomic) IBOutlet UITextView *body;
- (IBAction)outlineBodySelection {
[self.body.textStorage addAttributes:@{
NSStrokeWidthAttributeName : @-3,
NSStrokeColorAttributeName : [UIColor blackColor] }
range:self.body.selectedRange];
}
提示错误:
2016-05-18 20:51:09.128 Attributor[3349:151528] -[ViewController outlineBodySelection:]: unrecognized selector sent to instance 0x7fdd6871cce0
2016-05-18 21:05:53.606 Attributor[3349:151528] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController outlineBodySelection:]: unrecognized selector sent to instance 0x7fdd6871cce0'