gpt4 book ai didi

iphone - 如何在iPhone中单击按钮时打开网址

转载 作者:IT老高 更新时间:2023-10-28 11:48:55 25 4
gpt4 key购买 nike

我有一个来自 xml 的 NSString urlone 中的 url。但我运行应用程序它给出了过多的错误错误

  // urlone contains  http://www.forasinvest.com/v2/index.php

NSString*myurl=urlone;
NSURL *url = [NSURL URLWithString:myurl];
[[UIApplication sharedApplication] openURL:url];

最佳答案

我认为它应该可以正常工作,好的,只需复制粘贴以下内容进行简单测试

 [[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://www.forasinvest.com/v2/index.php"]];

关于iphone - 如何在iPhone中单击按钮时打开网址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8738373/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com