Re: managing split view iPad
Re: managing split view iPad
- Subject: Re: managing split view iPad
- From: Andrea Mattiuz <email@hidden>
- Date: Tue, 20 Jul 2010 17:21:37 +0200 (CEST)
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 (email@hidden)
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:
This email sent to email@hidden