Hi,
I'm a little stumped with an issue that I think goes back to my design. I'm constructing a TableViewController based on a mainly static set of rows (4) - using that as a basis for a UITableView. Each row will kick off varying different views (detail, and UITableViews)... In my managed object context for the top view I can easily nav to the associated detail view because it's in context (nickname).. I initially thought about simply having un related tables and a series of buttons that would fire off the views... But I ditched that idea. My main current issue is knowing how to switch MOC or to different fetchedresults controllers (which are by the way defined in each .m to fetch from different tables.
At the moment, I've got a switch inside of TableViewControler.m.. This snipit works:
enter - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSInteger switchval = indexPath.row;
switch (switchval) { case 0: // Nickname { //This version brings up a detailed view controller - NickNameDetail *controller = [[NickNameDetail alloc] initWithNibName:@"NickNameDetail" bundle:nil]; controller.fetchedResultsController = self.fetchedResultsController; controller.managedObjectContext = [self.fetchedResultsController objectAtIndexPath:indexPath]; [self.navigationController pushViewController:controller animated:YES];
break;
}
case 1:
{
NextTableViewContoller *.... (etc)... here here
However, I can't figure out how to switch to a different context and get different rows.
meTableViewController.managedObjectContext = self.managedObjectContext; nickNameDetail.managedObjectContext = self.managedObjectContext; nextTableViewController.managedObjectContext = self.managedObjectContext;
Anyone run into a scenario like this before? Sorry, can't get the code formatter to behave.
Thanks!