Why popping a controller of a UINavigationController nested in a UISplitViewController animates the whole splitView?

You need to overide the UITableViewController class and implement the.

Up vote 0 down vote favorite share g+ share fb share tw.

I have an app for iPad with a UISplitViewController in it (UsersSplitViewController). On the left side (ROOT) of it I installed a UINavigationController (while the right side is used for a custom view). The Navigation Controller has a hierarchy of 2 view controllers (2 different tableViews).

As long as I push the second tableView on the stack (by selecting a row in the first tableview) everything works just fine: the animation consists in the second tableview sliding in from the right (default). However, when I touch the back button while the second controller is showed, instead of animating just the navigationController, the whole SplitViewController is animated (sliding in from the top of the screen! ).

Obviously, this is ugly, and just what I don't want... can anyone help? This is where all the main controllers get instatiated (inside AppDelegate): usersSplitViewController=UISplitViewController alloc init; usersRootViewController=UsersRootViewController alloc initWithDataSource:self; usersRootViewController. DataSource=self; usersRootViewController.

AppDelegate=self; usersDetailViewController=UsersDetailViewController alloc init; usersDetailViewController. DataSource=self; usersDetailViewController. AppDelegate=self; usersDetailViewController.

Urvc=usersRootViewController; usersRootViewController. UsersDetailViewController=usersDetailViewController; usersSplitViewController. ViewControllers=NSArray arrayWithObjects:usersRootViewController,usersDetailViewController,nil; usersSplitViewController.

Delegate=usersDetailViewController; usersRootViewController release; this is where, inside UsersRootViewController (subclass of UINavigationController), I instantiate the tableViews to be showed: UITableViewController *userKindTableViewController=UITableViewController alloc init; //first tableView: userKind=UITableView alloc initWithFrame:self.view. Frame style:UITableViewStyleGrouped; userKind. DataSource=self; userKind.

Delegate=self; userKindTableViewController. TableView=userKind; userKindTableViewController. ContentSizeForViewInPopover=CGSizeMake(320.0, 200.0); self pushViewController:userKindTableViewController animated:NO; userKindTableViewController release; //second tableView: usersOfKindTableViewController =UITableViewController alloc init; usersOfKind=UITableView alloc initWithFrame:self.view.

Frame style:UITableViewStylePlain; usersOfKind. DataSource=self; usersOfKind. Delegate=self; usersOfKindTableViewController.

TableView=usersOfKind; usersOfKindTableViewController. ContentSizeForViewInPopover=CGSizeMake(320.0, 600.0); finally, I Push the second TableView in the first one's "didSelectRowAtIndexPath": self pushViewController:usersOfKindTableViewController animated:YES; Thanks ios cocoa-touch ipad uinavigationcontroller uisplitviewcontroller link|improve this question asked Dec 15 '11 at 10:15micamoita136.

You need to overide the UITableViewController class and implement the shouldAutorotateToInterfaceOrientation: method so that it returns YES for UIInterfaceOrientationLandscapeLeft and UIInterfaceOrientationLandscapeRight orientations. Then use this class for your userKindTableViewController and usersOfKindTableViewController variables.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions