[英]iOS - How to open the links in the default browser (Safari or Chrome) instead of the in-app browser?
I am using the QR Reader App to scan the QR Code with the link inside(for example: http://example.com ) 我正在使用QR阅读器应用程序扫描带有内部链接的QR码(例如: http : //example.com )
Then example.com will be open in QR Reader in-app browser (I don't know what is it). 然后example.com将在QR Reader应用内浏览器中打开(我不知道它是什么)。
In my website, I want to have a button called "Open In Default Browser" (Safari or Chrome), and touch this button to launch example.com in my default browser on phone (not in-app browser). 在我的网站中,我想要一个名为“在默认浏览器中打开”(Safari或Chrome)的按钮,然后触摸此按钮以在手机的默认浏览器(而非应用内浏览器)中启动example.com。
NSString *apikey = @"your url";
NSURL *url = [NSURL URLWithString:apikey];
[[UIApplication sharedApplication] openURL:url];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.