0
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSError *error = nil;
NSString *jsonString = [[NSJSONSerialization JSONObjectWithData:_buffer options:0 error:&error] description];
dispatch_async(dispatch_get_main_queue(), ^{
if (!error)
{
self.textField.text = jsonString;
}
else
{
self.textField.text = [error localizedDescription];
}
[self.spinner stopAnimating];
[self.fetchButton setEnabled:YES];
self.connection = nil;
self.buffer = nil;
});
});
}connectionDidFinishLoading示出了的NSString * jsonString線
當我寫該方法然後將其示出了在第五行誤差的誤差。請幫助我我是新的Iphone.Thanks提前。
我假設''&是不是wr在你的實際代碼中如此呢?錯誤說的是什麼? – Stuart 2014-09-22 09:50:44
那我該怎麼辦? – 2014-09-22 09:52:26
你應該告訴我什麼錯誤說... – Stuart 2014-09-22 09:53:17