diff --git a/MMDrawerController/MMDrawerController.h b/MMDrawerController/MMDrawerController.h index 4369829d..5d06d7b2 100644 --- a/MMDrawerController/MMDrawerController.h +++ b/MMDrawerController/MMDrawerController.h @@ -281,7 +281,7 @@ typedef void (^MMDrawerControllerDrawerVisualStateBlock)(MMDrawerController * dr @param completion The block called when the animation is finsihed. */ --(void)setCenterViewController:(UIViewController *)centerViewController withCloseAnimation:(BOOL)closeAnimated completion:(void(^)(BOOL))completion; +-(void)setCenterViewController:(UIViewController *)centerViewController withCloseAnimation:(BOOL)closeAnimated completion:(void(^)(BOOL finished))completion; /** Sets the new `centerViewController`. @@ -293,7 +293,7 @@ typedef void (^MMDrawerControllerDrawerVisualStateBlock)(MMDrawerController * dr @param completion The block called when the animation is finsihed. */ --(void)setCenterViewController:(UIViewController *)newCenterViewController withFullCloseAnimation:(BOOL)fullCloseAnimated completion:(void(^)(BOOL))completion; +-(void)setCenterViewController:(UIViewController *)newCenterViewController withFullCloseAnimation:(BOOL)fullCloseAnimated completion:(void(^)(BOOL finished))completion; ///--------------------------------------- /// @name Animating the Width of a Drawer diff --git a/MMDrawerController/MMDrawerController.m b/MMDrawerController/MMDrawerController.m index e4102918..629469eb 100644 --- a/MMDrawerController/MMDrawerController.m +++ b/MMDrawerController/MMDrawerController.m @@ -171,7 +171,7 @@ -(id)initWithCenterViewController:(UIViewController *)centerViewController right } #pragma mark - Open/Close methods --(void)toggleDrawerSide:(MMDrawerSide)drawerSide animated:(BOOL)animated completion:(void (^)(BOOL))completion{ +-(void)toggleDrawerSide:(MMDrawerSide)drawerSide animated:(BOOL)animated completion:(void (^)(BOOL finished))completion{ NSParameterAssert(drawerSide!=MMDrawerSideNone); if(self.openSide == MMDrawerSideNone){ [self openDrawerSide:drawerSide animated:animated completion:completion]; @@ -189,11 +189,11 @@ -(void)toggleDrawerSide:(MMDrawerSide)drawerSide animated:(BOOL)animated complet } } --(void)closeDrawerAnimated:(BOOL)animated completion:(void (^)(BOOL))completion{ +-(void)closeDrawerAnimated:(BOOL)animated completion:(void (^)(BOOL finished))completion{ [self closeDrawerAnimated:animated velocity:self.animationVelocity animationOptions:UIViewAnimationOptionCurveEaseInOut completion:completion]; } --(void)closeDrawerAnimated:(BOOL)animated velocity:(CGFloat)velocity animationOptions:(UIViewAnimationOptions)options completion:(void (^)(BOOL))completion{ +-(void)closeDrawerAnimated:(BOOL)animated velocity:(CGFloat)velocity animationOptions:(UIViewAnimationOptions)options completion:(void (^)(BOOL finished))completion{ if (self.isAnimatingDrawer) { if(completion){ completion(NO); @@ -249,13 +249,13 @@ -(void)closeDrawerAnimated:(BOOL)animated velocity:(CGFloat)velocity animationOp } } --(void)openDrawerSide:(MMDrawerSide)drawerSide animated:(BOOL)animated completion:(void (^)(BOOL))completion{ +-(void)openDrawerSide:(MMDrawerSide)drawerSide animated:(BOOL)animated completion:(void (^)(BOOL finished))completion{ NSParameterAssert(drawerSide != MMDrawerSideNone); [self openDrawerSide:drawerSide animated:animated velocity:self.animationVelocity animationOptions:UIViewAnimationOptionCurveEaseInOut completion:completion]; } --(void)openDrawerSide:(MMDrawerSide)drawerSide animated:(BOOL)animated velocity:(CGFloat)velocity animationOptions:(UIViewAnimationOptions)options completion:(void (^)(BOOL))completion{ +-(void)openDrawerSide:(MMDrawerSide)drawerSide animated:(BOOL)animated velocity:(CGFloat)velocity animationOptions:(UIViewAnimationOptions)options completion:(void (^)(BOOL finished))completion{ NSParameterAssert(drawerSide != MMDrawerSideNone); if(self.isAnimatingDrawer){ if(completion){ @@ -351,7 +351,7 @@ -(void)setCenterViewController:(UIViewController *)centerViewController animated } } --(void)setCenterViewController:(UIViewController *)newCenterViewController withCloseAnimation:(BOOL)animated completion:(void(^)(BOOL))completion{ +-(void)setCenterViewController:(UIViewController *)newCenterViewController withCloseAnimation:(BOOL)animated completion:(void(^)(BOOL finished))completion{ [self setCenterViewController:newCenterViewController animated:animated]; if(self.openSide != MMDrawerSideNone){ @@ -377,7 +377,7 @@ -(void)setCenterViewController:(UIViewController *)newCenterViewController withC } } --(void)setCenterViewController:(UIViewController *)newCenterViewController withFullCloseAnimation:(BOOL)animated completion:(void(^)(BOOL))completion{ +-(void)setCenterViewController:(UIViewController *)newCenterViewController withFullCloseAnimation:(BOOL)animated completion:(void(^)(BOOL finished))completion{ if(self.openSide != MMDrawerSideNone && animated){