gpt4 book ai didi

ios - 无法将字符串设置为 URLWithString

转载 作者:行者123 更新时间:2023-11-28 19:57:47 25 4
gpt4 key购买 nike

我对 Facebook 页面的操作有疑问。

currentVriend 是一个 NSObject 类。

我收到错误:方法调用的参数太多,预期 1 有 2

-(void)goFB
{
NSURL *url = [NSURL URLWithString:@"fb://profile/%g",self.currentVriend.fbid];
[[UIApplication sharedApplication] openURL:url];
}

我做错了什么?也许制作另一个 String?谢谢

最佳答案

我相信你错过了正确的 NSString 方法

NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"fb://profile/%g",self.currentVriend.fbid]];

关于ios - 无法将字符串设置为 URLWithString,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25558473/

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