I am trying to create a custom sidebar navigation pane in my iPad app something like Instapaper for iPad. With the help of some excellent tutorials like the one by Scott Sherwood, I was able to create a custom sidebar and switch between the view controllers.
I implemented this using a root view controller in which I have two views – one is the tabbar view, other represents the content associated with the tab selected, something like this…

Whenever I select the tab I just add a subview to the Root View Controller, like this…
@implementation RootViewController
//
// some code here
//
#define TABBAR_WIDTH 80.0F
- (void)buttonTapped:(UIButton *)aButton
{
UIViewController *newVC = [self.storyboard instantiateViewControllerWithIdentifier:@"SomeView"];
[newVC.view setFrame:CGRectMake(TABBAR_WIDTH, 0, self.view.bounds.size.width - TABBAR_WIDTH, self.view.bounds.size.height)];
[self addSubView:newVC.view];
}
Now what I want to do is push a new view into the Contents not based on tab selection but based on some interaction in the contents view. The way I have figured out to do this is adding another subview to the superview. In that case, however I will have to implement the pushing, popping, back buttons, animations between views all by myself.
I was wondering if I can implement this scenario using UINavigationController (so that the pushing, popping, back buttons are handled auto-magically).
Can somebody shed some light over this topic? May be even a brief overview of how this could have been implemented in Instapaper iPad app would help.
Here you require navigation in the container view.
So you can go with this thing:
Alloc – init your navigation controller in your root controller where you have your custom tab and container view in xib…
Note: Clear your container view before adding any other views.
I have already done this scenario so its working fine for me.
Hope this is what you required…
Enjoy Coding 🙂