Opening Safari from your iPhone app

A very simple task I know but when you are starting out its nice to find it on a blog!
Somewhat similar to using URLRequest in AS3 really.
[code]
NSString *urlString = @”http://www.mywebsite.com”;
NSURL *url = [[NSURL alloc] initWithString: urlString];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];

[webView loadRequest:request];//UIWebView instance named webView declared earlier
[request release];
[url release];
[/code]

Leave a Reply

Your email address will not be published. Required fields are marked *