Search code examples
iosobjective-cuistoryboarduitabbarunwind-segue

Tab bar with slide out menu


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];
}
}

If I click back from my RearViewController the ViewController is not presented instead it just peeps and goes off(again shows RearViewcontroller).

Image2

enter image description here


Solution

  • I give you a solution for your question.

          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".
    

    Thank You