在程序里设置加载网页

来源:互联网 发布:ncs刷机软件 编辑:程序博客网 时间:2024/04/27 16:12

    NSURL *url = [[NSURL alloc]initWithString:webUrl];

    

    [self.webView loadRequest:[NSURLRequest requestWithURL:url]];

    

    UIWebView *webView = [[UIWebViewalloc]initWithFrame:self.view.frame];

    [webView loadRequest:[NSURLRequestrequestWithURL:[NSURLURLWithString:@"http://XXXXXX"]]];

    

    [self.viewaddSubview:webView];

0 0
原创粉丝点击