Ok, I figured it out.
There is a property called
@property (nonatomic, readonly) JASidePanelState state;
It says: "The current state of the panels. Use KVO to monitor state changes."
There are 3 state changes that I can control with this:
JASidePanelCenterVisible = 1, JASidePanelLeftVisible, JASidePanelRightVisible
Now I react to changes in the KVO to the state. In the left pane of viewDidLoad I have:
[self.sidePanelController addObserver:self forKeyPath:@"state" options:NSKeyValueObservingOptionNew context:nil];
and to get a change in state I have:
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { if ([keyPath isEqual:@"state"]) { if ([change[@"new"] isEqual:[NSNumber numberWithInt:1]]) { NSLog(@"Saving settings"); } } }
source share