Mats Stijlaart
Mats Stijlaart

Reputation: 5098

Load safari from ipad application

Heey,

Does anybody know how to start safari from a ipad application?

I wan't an info view in my application with a button to my website. The 'things' application does it, so i know it is possible. Just don't know how.

Thanks

Upvotes: 1

Views: 155

Answers (2)

Joshua Nozzi
Joshua Nozzi

Reputation: 61228

See UIApplication's -openURL:. This "does the right thing" for the http:, https:, tel:, and mailto: schemes.

Upvotes: 1

Pablo Santa Cruz
Pablo Santa Cruz

Reputation: 181350

On your button action place this code:

[
    [UIApplication sharedApplication] 
       openURL:[NSURL URLWithString:@"http://www.yourwebsite.com"]
];

Upvotes: 1

Related Questions