【发布时间】:2014-07-11 08:40:00
【问题描述】:
这是我的代码。
NSString *target = @"http://www.google.com/";
NSString *html = [NSString stringWithContentsOfURL: [NSURL URLWithString:@"%@", target] encoding: -2147481280 error: nil];
我的代码给了我上面的错误
Too many arguments to method call expected 1 have 2
谁来帮帮我..
【问题讨论】:
-
[NSURL URLWithString:@"%@", target] -> URLWithString 将 NSString 作为参数,而不是 formatedString。解决方案由 [NSURL URLWithString:target] 替换。
标签: ios objective-c arguments nsurl