0

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..

Nich
  • 1,112
  • 1
  • 14
  • 29
  • Keep those controllers around in AppDelegate and track which is active. Maybe you could subclass your ViewControllers so they'd provide the same interface. – adamkonrad Dec 11 '13 at 01:01

1 Answers1

0

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.

FluffyJack
  • 1,732
  • 10
  • 15