0
的NSUnknownKeyException
我的代碼:的UITextView
@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?
不能與所提供的代碼重現此。 – mAu