I have a simple blog app that parses an RSS on launch, and loads the stories into a table view. Sometimes, with slow internet, the articles do not load properly into the table view, and a refresh button is needed. I have the button created, and action linked to do this, but I would like for the button to only be visible if the table view load fails. I have this created so far:
Code:
- (void)viewDidAppear:(BOOL)animated {
NSUInteger *count2 = [_allEntries count];
if (count2 > 0) {
[[myNavigationBar topItem]setLeftBarButtonItem:nil animated:NO];
}
[super viewDidAppear:animated];
}
Now, if the table view doesn't load, I can click the Reload button, and it will work great. The problem is that the Reload button is always shown at launch time, because it doesn't start trying to load the RSS until after launch. Is there a way I can set the button to NOT be visible at launch, UNLESS, it fails to load the feed?