views:

716

answers:

2

Hi I am trying to switch between views. The classes inherits from UINavigationController. I am using this code in my IBAction:

    CellSubview *personView = [[CellSubview alloc] init]; // The new navigation controller
 self.modalTransitionStyle = 0; // tried all 3 of the options
 [self presentModalViewController:personView animated:YES];
 [personView release];

when :

     @interface CellSubview : UINavigationController

I just cant make the view to slide to the right. (as most of the applications does)

It always comes from the bottom up and non of the option:

  personView.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
  // or
  personView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

I just want oldViewController.view slide left and the new newViewController.view to get in from the right.

Appreciate your advise

Itay

A: 

Don't use presentModalViewController:. Use

[self.navigationController pushViewController:personView animated:YES];

If you want to hide the navigation bar on the new screen, then use

[self.navigationController setNavigationBarHidden:YES animated:YES];
Ed Marty
A: 

The modalTransitionStyle property has to be set on the view controller, that is presented modally, that is on personView in your case.

hennes