开发者

Load safari from ipad application

开发者 https://www.devze.com 2023-01-11 22:07 出处:网络
Heey, Does anybody know how to start safari from a ipad a开发者_运维知识库pplication? I wan\'t an info view in my application with a button to my website. The \'things\' application does it, so i kn

Heey,

Does anybody know how to start safari from a ipad a开发者_运维知识库pplication?

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


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


On your button action place this code:

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

精彩评论

暂无评论...
验证码 换一张
取 消