I want to push two different view controllers: 1). When tableView is in “normal mode” 2). When the table view is in editing mode. The edit button is on my navigation bar. When the Table View is in “normal mode” I can select a cell, It turns blue and pushes my View Controller. How can I make it so that the table view is able to be selected while in edit mode? Here is what i have done so far:
- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
DetailViewController *detailViewController = [[DetailViewController alloc] initForNewItem:NO];
[detailViewController setItem:selectedItem];
//This doesnt work because i cant select the cell
if(aTableView.editing){
[[self navigationController] pushViewController:detailViewController animated:YES];
} else {
//push something else
}
Maybe you should set the UITableView property allowsSelectionDuringEditing to YES (by default it’s NO). Try to set it in the LoadView, not in the init.