iOS 用UIWebView加载网页

NSString *Str = @"www.baidu.com";

NSString *htmlStr = [Str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

NSUrl *url = [NSURl all]initWithString:htmlStr];

[myWebView loadRequest:[NSURLRequest requestWIthURL:url]];

你可能感兴趣的:(iOS 用UIWebView加载网页)