2

我的故事板

后视控制器.m

-(IBAction)unwindFromViewController:(UIStoryboardSegue *)segue
{
    if ([segue.identifier isEqualToString:@"unwindToViewController"]) {
      ViewController *detail = [self.storyboard instantiateViewControllerWithIdentifier:@"ViewController"];
        [self presentViewController:detail animated:YES completion:nil];
}
}

如果我从未显示RearViewControllerViewController位置单击返回,它只会窥视并熄灭(再次显示RearViewcontroller)。

图片2

在此处输入图像描述

4

1 回答 1

1

我给你一个解决你的问题。

      1.First remove triggered segue connection.
      2.After that give push segue connection to Back to your required view controller.
      3.Click Back Button Segue and give Identifier name as "goToMainViewController" or whatever you want just give there.Also segue should be "push".

谢谢你

于 2015-08-03T10:06:42.103 回答