您好,我在iOS開發中更新鮮。 下面是我收到的錯誤:語法錯誤:方法調用的參數過多,預計爲1,有2個
generate syntax error. error like as "Too many arguments to method call, expected 1, have 2"
for (int i=1; arrParseRespnse.count; i++)
{
[arruserName addObject:[[arrParseRespnse objectForKey:@"%@",i]objectForKey:@"userName"]];
}
error:Too many arguments to method call, expected 1, have 2
感謝。
什麼是'[arrParseRespnse objectForKey:@「%@」,i]'應該是? – rmaddy
仍然會產生錯誤:我想從json獲取值,代碼是:{ 1 = {0} {0} {0} {0} currentHeader = 0; emailid =「[email protected]」; password = password; userId = 11; userName = defaultUser; }; 2 = {current_eader = 0; emailid =「[email protected]」; password = sam; userId = 12; userName = sam; }; 3 = {current_eader = 0; emailid =「[email protected]」; password = amit; userId = 13; userName = amit; }; } – Bhavdip