2013-05-22 27 views
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? 
+0

不能與所提供的代碼重現此。 – mAu

回答

0

對不起,這是我的錯誤:

[UItextView.text setValue:@"<b>big</b><br>blah blah" forKey:@"contentToHTMLString"]; 

我不能用文字,對不起