我想将数据库中的文本添加到 UIWebView,但我遇到了一个无法处理的错误。
在我的 .h 中:
#import <UIKit/UIKit.h>
@interface readNotice : UIViewController {
IBOutlet UILabel *message;
IBOutlet UIWebView *body;
}
@property(nonatomic, retain)IBOutlet UILabel *message;
@property(nonatomic, retain)IBOutlet UIWebView *body;
-(void)getNoticeData:(NSString *)noticeID:(NSString *)noticeTitle;
@end
在他们中:
@synthesize message,body;
-(void)getNoticeData:(NSString *)noticeID:(NSString *)noticeTitle {
//some taks not useful for this code
NSString *bodyText = [dict objectForKey:@"introtext"];
[body loadHTMLString: bodyText];
}
我得到的错误:
No visible @interface for 'UIWebView' declares the selector 'loadHTMLString:'
为什么会这样?先感谢您