Hi!
I was wondering if there was a way to automatically hide the edit button (left navigation bar) when the the table view is empty. Also would it be posssible to disable the "+" button when in edit/deletion mode? Below is what i did to try to achieve this but there are some cases where this approach doesn't work.
- (void)viewDidLoad {
[super viewDidLoad];
// Instantiate the tabel model
tableModel = [[SCArrayOfObjectsModel alloc] initWithTableView:self.tableView withViewController:self
withEntityClassDefinition:someClassDef];
tableModel.addButtonItem = self.navigationItem.rightBarButtonItem;
tableModel.autoSortSections = TRUE;
tableModel.hideSectionHeaderTitles = TRUE;
if ( tableModel.sectionCount > 0) {
self.navigationItem.leftBarButtonItem = self.editButtonItem;
tableModel.editButtonItem = self.editButtonItem;
}
}
- (void)tableViewModelWillBeginEditing:(SCTableViewModel *) tableViewModel
{
tableModel.addButtonItem.enabled = NO;
}
- (void)tableViewModelDidEndEditing:(SCTableViewModel *) tableViewModel
{
tableModel.addButtonItem.enabled = YES;
if (tableModel.sectionCount > 0) {
self.navigationItem.leftBarButtonItem = self.editButtonItem;
tableModel.editButtonItem = self.editButtonItem;
}
else
{
self.navigationItem.leftBarButtonItem = nil;
tableModel.editButtonItem = nil;
}
}
Thanks and keep the features coming in

.