(Не удается найти способ комментировать ...)
У меня та же проблема, и я попробовал этот подход. Очистил appRecords, используя removeAllObjects, но во второй раз все работает для статей, но значки не загружаются.
Вы можете воспроизвести проблему, изменив исходный пример кода следующим образом:
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
// Настройка и отображение окна
[окно addSubview: [представление self.navigationController]];
[window makeKeyAndVisible];
// Initialize the array of app records and pass a reference to that list to our root view controller
self.appRecords = [NSMutableArray array];
rootViewController.entries = self.appRecords;
// NSURLRequest * urlRequest = [NSURLRequest requestWithURL: [NSURL URLWithString: TopPaidAppsFeed]];
//self.appListFeedConnection = [[[NSURLConnection alloc] initWithRequest: делегат urlRequest: self] autorelease];
// Test the validity of the connection object. The most likely reason for the connection object
// to be nil is a malformed URL, which is a programmatic error easily detected during development
// If the URL is more dynamic, then you should implement a more flexible validation technique, and
// be able to both recover from errors and communicate problems to the user in an unobtrusive manner.
//
//NSAssert(self.appListFeedConnection != nil, @"Failure to create URL connection.");
// show in the status bar that network activity is starting
// [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
[self reloadData];
}
- (IBAction) перезагрузка: (id) отправитель {
[self reloadData];
}
- (void) reloadData {
NSLog (@ "Обновление записей");
[self.appRecords removeAllObjects];
// [[myTableViewController imageDownloadsInProgress] removeAllObjects];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:TopPaidAppsFeed]];
self.appListFeedConnection = [[[NSURLConnection alloc] initWithRequest:urlRequest delegate:self] autorelease];
// Test the validity of the connection object. The most likely reason for the connection object
// to be nil is a malformed URL, which is a programmatic error easily detected during development
// If the URL is more dynamic, then you should implement a more flexible validation technique, and
// be able to both recover from errors and communicate problems to the user in an unobtrusive manner.
//
NSAssert(self.appListFeedConnection != nil, @"Failure to create URL connection.");
// show in the status bar that network activity is starting
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
}