0

私のコード:

@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?
4

1 に答える 1

0

申し訳ありませんが、それは私の間違いです:

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

テキストは使えません、ごめんなさい

于 2013-05-22T10:37:22.217 に答える