#在蓝懿学习iOS的日子#day18

1建立一个WebView
首先要搭建
然后编写代码 @property (weak, nonatomic) IBOutlet UIWebView *myWV;
@property (weak, nonatomic) IBOutlet UITextField *myTF;

@end

@implementation ViewController
- (IBAction)clicked:(id)sender {
   
    NSURL *url = [NSURL URLWithString:self.myTF.text];
    //创建请求
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
   
    [self.myWV loadRequest:request];
   
   
}
posted @ 2015-11-13 21:30  一笑抿江湖  阅读(95)  评论(0编辑  收藏  举报