0

I have the following Storyboard:

I dont have enough rep points yet for images :( so I posted it here:

http://www.bodharr.com/brionh/example.png

I have the following code in my Journal ViewController Class:

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if ([segue.identifier isEqualToString:@"DiaJournals"])
    {
        UINavigationController *controller =segue.destinationViewController;
        [self presentModalViewController:controller animated:YES];
    }
}

When I push to my navigation controller the tab bar menu disappears but the table view comes up with all my data. How do I properly segue to maintain the tab bar menu from my Journals ViewController to my Navigation Controller?

I know this is a total noobie question and I honestly have done lots of research on storyboarding and seques but other then here: How within a tab bar controller do I segue from one view controller to another and retain the tab bar? and honestly been trying to fit that into my situation, but I am just so lost and frustrated on this. Any Help appreciated and I always mark answers.

Community
  • 1
  • 1
BriOnH
  • 945
  • 7
  • 18

1 Answers1

0

You should wire your Journal ViewController directly to your table view controller, and set the segue style to push. Then the tab bar will maintain there when the tableview been pushed. In your storyboard the navigation controller is modaled by the Journal ViewController , so the tab bar will disappear.

lu yuan
  • 7,207
  • 9
  • 44
  • 78
  • Style is set to push, but i see your point with the presentModalViewController (and I should have gotten that from the last example i looked at, doh) what should I replace that line with? – BriOnH Jun 15 '12 at 18:34
  • @BriOnH Just comment it. But I find in your .png that the style of the segue with identifier "DiaJournals" is modal. ps. Navigation view controller cant not be pushed. – lu yuan Jun 15 '12 at 18:38
  • @BriOnH Why not embeded your Journal ViewController in a Navigation controller? – lu yuan Jun 15 '12 at 18:41
  • @luyaun - I embedded it and it worked! Thank you!! Wish I had the points to vote you up. Thank you!!! – BriOnH Jun 15 '12 at 20:32