diff --git a/TLYShyNavBar/ShyControllers/TLYShyController.m b/TLYShyNavBar/ShyControllers/TLYShyController.m index 544c861..1a9ce15 100644 --- a/TLYShyNavBar/ShyControllers/TLYShyController.m +++ b/TLYShyNavBar/ShyControllers/TLYShyController.m @@ -121,14 +121,12 @@ const CGFloat contractionVelocity = 300.f; - (CGFloat)expand { - [self.child expand]; - return 0.f; + return [self.child expand]; } - (CGFloat)contract { - [self.child contract]; - return 0.f; + return [self.child contract]; } @end diff --git a/TLYShyNavBar/TLYShyNavBarManager.m b/TLYShyNavBar/TLYShyNavBarManager.m index edf646e..426a6d3 100644 --- a/TLYShyNavBar/TLYShyNavBarManager.m +++ b/TLYShyNavBar/TLYShyNavBarManager.m @@ -147,6 +147,7 @@ CGFloat tly_AACStatusBarHeight(void) self.navBarController.child = self.extensionController; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive) name:UIApplicationDidBecomeActiveNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidChangeStatusBarFrame) name:UIApplicationDidChangeStatusBarFrameNotification object:nil]; } return self; } @@ -394,6 +395,11 @@ CGFloat tly_AACStatusBarHeight(void) #pragma mark - NSNotificationCenter methods +- (void)applicationDidChangeStatusBarFrame +{ + [self prepareForDisplay]; +} + - (void)applicationDidBecomeActive { [self.navBarController expand];