两个画面之间的切换只要设置Segue后就可以了,如果已经设置了Segue由于某些原因需要时Segue暂时失去作用,只要实现shouldPerformSegueWithIdentifier:sender:方法,返回NO

-(BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender

{

 return NO;

}

 

不使用Segue的画面切换

-(void)viewDidAppear:(BOOL)animated

{

    UIViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"abc"] ;

    [self showDetailViewController:vc sender:self];

}

如果本身在Navigation Controller控制下的视图,可以使用一下代码加载另一个View Controller

 UIViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"abc"] ;

    [self.navigationController showDetailViewController:vc sender:self];