我对 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/