我只使用appID从appStore获取应用程序的应用程序屏幕截图,
NSString *numericIDStr = appID;
NSString *urlStr = [NSString stringWithFormat:@"http://itunes.apple.com/lookup?id=%@", numericIDStr];
NSURL *url = [NSURL URLWithString:urlStr];
NSData *json = [NSData dataWithContentsOfURL:url];
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:json options:0 error:NULL];
NSArray *results = [dict objectForKey:@"results"];
NSDictionary *result = [results objectAtIndex:0];
myArray = [result objectForKey:@"screenshotUrls"];我设法使用SDWebImage缓存截图,它工作得很完美,但我注意到每次我调用这个方法时,它会延迟3-4秒,在3G上延迟更多,大约10-15秒。
以及其他问题,我的应用程序在没有连接到互联网时崩溃,有没有办法缓存这个方法或类似的东西?
https://stackoverflow.com/questions/21802560
复制相似问题