2

I'm trying to use JASidePanels (from github) in my project. I'm using centerviewcontroller, leftviewconrtoller and JASidePanelController based on library example. I've placed UIView on centerviewcontroller then i added IBOutlet.

 @property (weak, nonatomic) IBOutlet UIView *myview;

I need to change its color when the menu appears. How can i do it? I can change the color of centerviewcontroller.view but I can't change the color of UIView i've placed on centerviewcontroller.view. I can change the color in centerviewcontroller

  self.myview.backgroundColor = [UIColor redColor];.

but I do not know how to do this from JASidePanelController.

JOM
  • 8,139
  • 6
  • 78
  • 111

1 Answers1

0

Assuming your UIViewController is called MyViewController.

The following will allow you access to the centerViewController to change its backgroundColor:

MyViewController* vc = self.centerViewController;
vc.view.backgroundColor = [UIColor redColor];
gotnull
  • 26,454
  • 22
  • 137
  • 203