How to load a URL into a UIWebView

The UIWebView as a method called loadRequest which takes an NSURLRequest as a parameter. This in turn can be created from an NSURL.

Here’s how this works:

NSURL *theURL = [[NSURL alloc] initWithString:@"http://www.yourwebsite.com"];
[self.myWebView loadRequest:[NSURLRequest requestWithURL:theURL]];




Leave a Reply