I'm trying to get a blog app to refresh the articles, and add any new articles that may have been written since prior launch.
The TableView uses an array _allEntries of all the articles in the feed. I was told that when the user clicks the refresh button, i should clear the array, and after clearing it, run the original [self refresh] code to parse the rss and repopulate the table view. I am doing that with:
However, when I do that, it crashes with error:
The TableView uses an array _allEntries of all the articles in the feed. I was told that when the user clicks the refresh button, i should clear the array, and after clearing it, run the original [self refresh] code to parse the rss and repopulate the table view. I am doing that with:
Code:
[_allEntries removeAllObjects];
[self refresh];
Code:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 4 beyond bounds for empty array'