Skip to content

Commit

Permalink
fixing bug where we were not removing observer at correct time
Browse files Browse the repository at this point in the history
  • Loading branch information
gotosleep committed Mar 20, 2012
1 parent 070a89f commit 4494ce2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions JASidePanels/Source/JASidePanelController.m
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ - (void)_sizeSidePanels {
- (void)setCenterPanel:(UIViewController *)centerPanel {
UIViewController *previous = _centerPanel;
if (centerPanel != _centerPanel) {
[self.gestureController removeObserver:self forKeyPath:@"view"];
[_centerPanel removeObserver:self forKeyPath:@"viewControllers"];
_centerPanel = centerPanel;
[_centerPanel addObserver:self forKeyPath:@"viewControllers" options:0 context:nil];
Expand Down

0 comments on commit 4494ce2

Please sign in to comment.