Resetting a TableView
Hi I have created a navigator controller and populated the tableview with data.
I have added a toolbar at the bottom of the screen and all buttons work fine (e.g. opening a modal screen). So that works.
I want to add a button to clear the table and load a new set of data. I have tried releasing the following code in the button function but it fails on reload data.
I would be grateful if you could help.
[menuList release];
self.menuList = [[NSMutableArray alloc] init];
[menuList addObject:[NSDictionary dictionaryWithObjectsAndKeys: NSLocalizedStringFromTable(@"PageOneTitle", @"myStrings", @""), kTitleKey, NSLocalizedStringFromTable(@"PageOneExplain", @"myStrings", @""), kExplainKey, @"http://farm4.static.flickr.com/3648/3426982284_d0283f2efc_s.jpg", kWebURL, nil]];
[self.tableView reloadData];
|