NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.krsconnect.no/community/api.html?method=bareListEventsByCategory&appid=620&category-selected=350&counties-selected=Vest-Agder,Aust-Agder
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.krsconnect.no/community/api.html?method=bareListEventsByCategory&appid=620&category-selected=catId&counties-selected=Vest-Agder,Aust-Agder"]];
NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSString *json_string = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
NSDictionary *object = [parser objectWithString:json_string error:nil];
NSArray *results = [parser objectWithString:json_string error:nil];
我有這個網址我想,類別選擇= 350應變量獲得價值如何做到這一點 我做的,但沒有得到結果,如果我給VAR名稱,而不是350如何在URL傳遞一個字符串值,在iPhone應用程序
我可以把所有的URL中的NSString – ali
- [NSCFNumber長]:無法識別的選擇發送到實例0x9307c60 這是給異常,當我使用這個 – ali
如果你的參數是一個整數,你應該使用%d參數而不是%@。請參閱[Apple格式指南](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265-SW1) –