kalafun
kalafun

Reputation: 3671

ios JASidePanels make the UINavigationController the centerViewController

In my application I am using the JASidePanels libraries, everything is set and working using storyboards, but I would like to push from my center view to a detail view by clicking on a tableViewCell, and for that I am assuming I need a UINAvigationController, can I somehow make the centerViewController start from a UINavigationController?

Upvotes: 0

Views: 404

Answers (1)

Jorge
Jorge

Reputation: 1066

You have to put an storyboard identifier to the Navigation Controller that embeds the main view controller you want to have as the center panel; then, set the center panel to be initialized with it in your "base" view controller (the one you subclassed with JASidePanelController).

// Hamburger menu setup
-(void) awakeFromNib
{
    [self setLeftPanel:[self.storyboard instantiateViewControllerWithIdentifier:@"menuViewController"]];
    [self setCenterPanel:[self.storyboard instantiateViewControllerWithIdentifier:@"mainDashboardNavigationController"]];
}

Where "mainDashboardNavigationController" is the storyboard identifier set to the UINavigationController that embeds what you want to present as center panel.

Hope it helps you, see the screenshot in the link below for more details. Xcode Screenshot

Upvotes: 1

Related Questions