Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sparetire

macrumors newbie
Original poster
Aug 9, 2008
7
0
This must be a stupid question but I couldn't quite figure out.

How do I bring up a browser from an iPhone app? Mind sharing some code samples?

Is there a way to embed an url within an app (eg. like an iframe)?

Thank you in a advance.

-Simon
 

Sbrocket

macrumors 65816
Jun 3, 2007
1,250
0
/dev/null
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:mad:"http://macrumors.com"]];

Keep in mind that this closes your application and launches Safari. This would not be the way to go about an embedded browser - WebKit through UIWebView is the way to do that.
 

sparetire

macrumors newbie
Original poster
Aug 9, 2008
7
0
Keep in mind that this closes your application and launches Safari. This would not be the way to go about an embedded browser - WebKit through UIWebView is the way to do that.

Does UIWebView work like an iframe? If I click on a link within the WebView, what will happen? Doe it terminate my app and take the user to Safari?

Thanks.

Simon
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.