webView 加载网页

- (void)initView

{

    _webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, offsetY, SCREEN_SIZE.width, SCREEN_SIZE.height - offsetY)];

    

    NSURL *url = [NSURL URLWithString:@"http://www.baidu.com"];

    

    [_webView loadRequest:[NSURLRequest requestWithURL:url]];

    [self.view addSubview:_webView];

 

}

原文地址:https://www.cnblogs.com/rankilau/p/4135177.html