iOS 開発は初めてです。iOS 5 で json パーサーを使用して画像を解析すると、アプリが遅くなります。この問題を解決するために誰か助けてください。
-(NSDictionary *)Getdata
{
NSString *urlString = [NSString stringWithFormat:@"url link"];
urlString = [urlString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
NSURL *url = [NSURL URLWithString:urlString];
NSData* data = [NSData dataWithContentsOfURL:url];
NSError* error;
NSDictionary* json;
if (data) {
json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error];
NSLog(@"json...%@",json);
}
if (error) {
NSLog(@"error is %@", [error localizedDescription]);
// Handle Error and return
// return;
}
return json;
}