On Jul 20, 2010, at 4.53 PM, Michael Babin wrote:

>I'm picturing a set-up like the one used by the Settings app on the iPad, 
having a split view with a table view on the left and a navigation view on the 
right. Selecting an item in the table view on the left sets a new "root view" 
in the navigation view on the right (using setViewControllers:animated:). 
Selecting an item in the top view of the navigation view on the right pushes a 
new view onto the navigation view (through pushViewController:animated:). I 
don't have a sample at hand to consult, but I would expect pushing a view to 
work in such a situation.
>
>Are you sure your controller code distinguishes between each situation 
correctly (tap on item in table view on the left vs. tap on item in top view in 
navigation view on the right) and handles each situation appropriately?

this is exactely what I have to do!
However selecting an item in the left view I set a view on the right side, but 
if I try to select another item the program crashes with EXC_BAD_ACCESS!

this is the code to present a new item on the right side (for the item 
selected at indexPath.row on the left):

case 6:{
  ViewIvaViewController *viewIva =[[ViewIvaViewController alloc] 
initWithNibName:@"ViewIva" bundle:[NSBundle mainBundle]];
  self.viewIvaViewController = viewIva;                 
  viewIva.navigationItem.title = [menu objectAtIndex:indexPath.row];            
        
  NSArray *viewControllers = [[NSArray alloc] initWithObjects:
viewIvaViewController, nil];            
        
  [mainDelegate.detailViewController.navigationController setViewControllers:
viewControllers animated:YES]; 
  [viewControllers release];
  [viewIva release];
}
break;
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to