我的代码:
@interface UITextView ()
- (id)styleString; // make compiler happy
@end
@interface MBTextView : UITextView
@end
#import "MBTextView.h"
@implementation MBTextView
- (id)styleString {
return [[super styleString] stringByAppendingString:@"; line-height: 1.2em"];
}
@end
我打电话:
[MBTextView setValue:@"<b>big</b><br>blah blah" forKey:@"contentToHTMLString"];
它给我NSUnknownKeyException。但如果我只使用:
[UItextView setValue:@"<b>big</b><br>blah blah" forKey:@"contentToHTMLString"]; all is ok.what wrong with my code?
答案 0 :(得分:0)
[UItextView.text setValue:@"<b>big</b><br>blah blah" forKey:@"contentToHTMLString"];
我无法使用文字,抱歉