带有滑出菜单的标签栏

时间:2015-07-29 08:59:14

标签: ios objective-c uistoryboard uitabbar unwind-segue

My Storyboard

RearViewController.m

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

如果我从RearViewController点击后退,ViewController未显示,则只会窥视并熄灭(再次显示RearViewcontroller)。

图像2

enter image description here

1 个答案:

答案 0 :(得分: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".

谢谢