0

Currently I'm using Unwind to get to the Main View of its Path.

This is the code I've on the Sender ViewController:

- (IBAction)showRecents:(UIStoryboardSegue *)segue {

[self.navigationController.tabBarController setSelectedIndex:1];
NSLog(@"Root of Navigation Executed");
}

This is how it looks before unwinding

enter image description here

And this is how it looks after unwinding from the source view controller:

enter image description here

The issue is that I don't understand why it's not showing the Green TopBar? Has something to do with the TabBarController?

This is my Path VC:

enter image description here

Eddwin Paz
  • 2,842
  • 4
  • 28
  • 48
  • Why is there no navigation bar in SourceVC? Did you set it to hidden there? – rdelmar Jul 18 '14 at 19:02
  • No, There is way to verify this? – Eddwin Paz Jul 18 '14 at 19:04
  • Verify what? It looks like you pushed from ProfileTableviewController to SourceVC, so there should be a navigation bar unless you set it to be hidden. – rdelmar Jul 18 '14 at 19:09
  • But if its hidden why its showing before the unwind? the Unwind just gets me to the Sender Controller. – Eddwin Paz Jul 18 '14 at 19:30
  • 1
    I mean hidden in SourceVC, not SenderVC. If you set it to hidden in SourceVC, then it will still be hidden when you go back. Try setting it to be not hidden in SenderVC's viewWillAppear method. – rdelmar Jul 18 '14 at 19:46
  • You Were Right the Source VC was hiding the TopBar, But how I this view Cannot show the TopBar How I show it again before unwinding? – Eddwin Paz Jul 18 '14 at 20:43
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/57581/discussion-between-rdelmar-and-eddwinpaz). – rdelmar Jul 18 '14 at 20:44

1 Answers1

0

The answer to this Question is to. First we need to Hide/Show the NavigationController on the Source ViewController and Before it disappear We need to Show it again. That Way on the Sender ViewController You will be able to see the Navigation Because it was set to be shown on the Source where the unwind its performed.

-(void)viewWillAppear:(BOOL)animated{
[self.navigationController setNavigationBarHidden:YES];
}

-(void)viewWillDisappear:(BOOL)animated{
[self.navigationController setNavigationBarHidden:NO];
}
Eddwin Paz
  • 2,842
  • 4
  • 28
  • 48