diff --git a/TLYShyNavBar/TLYShyNavBarManager.h b/TLYShyNavBar/TLYShyNavBarManager.h index 3c416a3..162b04f 100644 --- a/TLYShyNavBar/TLYShyNavBarManager.h +++ b/TLYShyNavBar/TLYShyNavBarManager.h @@ -77,7 +77,7 @@ @property (nonatomic) BOOL handleStatusBar; -- (void)expand; +- (void)expandWithCompletion:(void (^)())completion; @end diff --git a/TLYShyNavBar/TLYShyNavBarManager.m b/TLYShyNavBar/TLYShyNavBarManager.m index e289e89..1d44e00 100644 --- a/TLYShyNavBar/TLYShyNavBarManager.m +++ b/TLYShyNavBar/TLYShyNavBarManager.m @@ -424,10 +424,14 @@ static void * const kTLYShyNavBarManagerKVOContext = (void*)&kTLYShyNavBarManage self.previousYOffset = NAN; } -- (void)expand +- (void)expandWithCompletion:(void (^)())completion { [UIView animateWithDuration:0.2 animations:^ { [self cleanup]; + } completion:^(BOOL finished) { + if (completion) { + completion(); + } }]; }