简体   繁体   中英

iPhone4 - Call default browser with and redirect to a designated url

Like this question , I would like to write an app for iPhone4 to call default browser with and redirect to a designated url, could someone please suggest the code for this action?

Use the -[UIApplication openURL:] method, which is accessed through the sharedApplication method of UIApplication .

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM