ios - JASidePanels delegates for viewWillAppear ext not getting called -
ios - JASidePanels delegates for viewWillAppear ext not getting called -
so have set jasidepanels root controller implements jasidepanelcontroller , left panel different uiviewcontroller.
my problem left panel receives viewwillappear viewdidappear/disappear , viewwillappear , viewdid/willload 1 time first time user slides centre panel away. on these callback functions not called again.
what best way or how should respond these events within left panel view controller.
ok figured out.
there property called
@property (nonatomic, readonly) jasidepanelstate state;
it states: "current state of panels. utilize kvo monitor state changes"
there 3 states changes can monitor this:
jasidepanelcentervisible = 1, jasidepanelleftvisible, jasidepanelrightvisible
i react kvo changes state. in left panel's viewdidload have:
[self.sidepanelcontroller addobserver:self forkeypath:@"state" options:nskeyvalueobservingoptionnew context:nil];
and receive alter on state 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"); } } }
ios objective-c uiviewcontroller jasidepanels
Comments
Post a Comment