From f8ab62e4bb8f45c95c51dddfa55f994df98beec5 Mon Sep 17 00:00:00 2001 From: Jerry Date: Fri, 25 Mar 2016 17:18:34 +0800 Subject: [PATCH] Divisor is 0.There will be a result equal to "+Inf" The location of the original error: NSTimeInterval duration = [self animationDurationForAnimationDistance:distance]; The reason for the error: self.animationVelocity is 0 The solution: Exchange the method position ; Thank U; --- MMDrawerController/MMDrawerController.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MMDrawerController/MMDrawerController.m b/MMDrawerController/MMDrawerController.m index 4aec238b..bf7152d0 100644 --- a/MMDrawerController/MMDrawerController.m +++ b/MMDrawerController/MMDrawerController.m @@ -180,11 +180,12 @@ -(instancetype)initWithCenterViewController:(UIViewController *)centerViewContro } -(void)commonSetup{ + [self setAnimationVelocity:MMDrawerDefaultAnimationVelocity]; + [self setMaximumLeftDrawerWidth:MMDrawerDefaultWidth]; [self setMaximumRightDrawerWidth:MMDrawerDefaultWidth]; - [self setAnimationVelocity:MMDrawerDefaultAnimationVelocity]; - + [self setShowsShadow:YES]; [self setShouldStretchDrawer:YES];