Heres my prepare for segue code
Similar code worked like like this for me in another part of my same app, but for some reason, no matter what cell I click, the toDoList that is passed is always the index path of the first cell in the tableView.
Anyone have any ideas what could be happening?
*****************************************************************************
Problem Fixed
*****************************************************************************
Totally forgot that the segue I had set up in storyboard wasn't coming from the cell but a view from something old that I had done. Lesson learned to always double check.
Code:
if ([segue.identifier isEqualToString:@"ListToTaskSegue"])
{
ToDoList *selectedToDoList = [self.listArray objectAtIndex:self.tableView.indexPathForSelectedRow.row];
ONETaskViewController *taskListVC = segue.destinationViewController;
taskListVC.title = selectedToDoList.title;
taskListVC.toDoList = selectedToDoList;
NSLog(@"To-Do List %@",selectedToDoList);
}
Similar code worked like like this for me in another part of my same app, but for some reason, no matter what cell I click, the toDoList that is passed is always the index path of the first cell in the tableView.
Anyone have any ideas what could be happening?
*****************************************************************************
Problem Fixed
*****************************************************************************
Totally forgot that the segue I had set up in storyboard wasn't coming from the cell but a view from something old that I had done. Lesson learned to always double check.
Last edited: