diff --git a/TLYShyNavBar/TLYShyNavBarManager.m b/TLYShyNavBar/TLYShyNavBarManager.m index 518d8c0..93ac118 100644 --- a/TLYShyNavBar/TLYShyNavBarManager.m +++ b/TLYShyNavBar/TLYShyNavBarManager.m @@ -100,6 +100,8 @@ static inline CGFloat AACStatusBarHeight() }; self.navBarController.child = self.extensionController; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive) name:UIApplicationDidBecomeActiveNotification object:nil]; } return self; } @@ -111,6 +113,7 @@ static inline CGFloat AACStatusBarHeight() { _scrollView.delegate = _delegateProxy.originalDelegate; } + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; } #pragma mark - Properties @@ -318,6 +321,13 @@ static inline CGFloat AACStatusBarHeight() [self _handleScrollingEnded]; } +#pragma mark - Application did become active method + +- (void)applicationDidBecomeActive +{ + [self.navBarController expand]; +} + @end #pragma mark - UIViewController+TLYShyNavBar category