Get centerPanel controller JASidePanelController

274 Views Asked by At

currently I have 2 controller(A, B, C)

I'm using JASidePanelController. A is my menu controller which will display in JASidePanelController.

How do I track what controller is shown in the centerPanel?? The reason is because in my menulist, I want to change the specific row background according to specific controller..

1

There are 1 best solutions below

0
FluffyJack On

You can use willMoveToParentViewController as JASidePanelController is just a container controller.

So in your view controllers (you may want to subclass UIViewController and just subclass all your view controllers from the subclass that has this in it) you can use this code:

# In Your Center View Controllers
def willMoveToParentViewController(parentViewController)
  parentViewController.leftPanel.activeItem = 3 # See note below
end

That line that says See note below you would then have to get setup to be usable in your left view controller, but that's how you could communicate between the center and left panels.