Andre Cytryn
Andre Cytryn

Reputation: 2705

Right navigation item disappear when pushes JASidePanels

I am using the JASidePanels as submodule and I wanted to know if there is a way to keep the right icon on the navigation bar always visible and working.

For now I have my center panel which is a table view, and both left and right panels works.

But when I click a table view cell, it pushes a viewcontroller on it but the JASidePanel controls are lost... I cant slide it to the left to see my right panel.

Yes, I know that the left button will be replaced with the back button. This one is fine for me, I just care about the one on the right.

Upvotes: 1

Views: 860

Answers (1)

J2theC
J2theC

Reputation: 4452

UINavigationController presents UIViewController (and subclasses). Each UIViewController is associated with an UINavigationItem that contains the information about the tool bar items and navigation bar items. This information is only used when that particular view controller is presented in a UINavigationController. If you want to put a button from viewController 1 in viewController 2, you need to assign the button to the UINavigationItem instance of viewController 2. Note that, if the action:target receiver for the button action is not viewController 1, you can easily create the UIBarButtonItem instance with the same characteristics in viewController1 for viewController2's UINavigationItem instance in viewController2's viewDidLoad method.

Upvotes: 1

Related Questions