这样写不行吗? [self.MyWebview loadHTMLString:@”<html><body>hello</body></html>” baseURL:nil]; |
|
20分 |
这样写是完全可以,如果你看不到内容,请断点调试,看看MyWebview是否是空指针,如果是,很可能是因为没有设置outlet.
|
#import <UIKit/UIKit.h> @interface Untitled6ViewController : UIViewController { } @property (nonatomic,retain) IBOutlet UIWebView *MyWebview; @end 已经设置了 |