我想從我的數據庫添加文本到UIWebView,但我有一個我無法處理的錯誤。添加HTML文本到我的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
在.M:
@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:'
爲什麼會出現這種情況?謝謝你在前進
是的!我剛剛發現它!謝謝!!! – user1256477