diff --git a/clients/ios/Classes/NBModalPushPopTransition.m b/clients/ios/Classes/NBModalPushPopTransition.m index 6ac700985..7504f68d3 100644 --- a/clients/ios/Classes/NBModalPushPopTransition.m +++ b/clients/ios/Classes/NBModalPushPopTransition.m @@ -22,7 +22,7 @@ } - (CGFloat)transitionDuration:(id )transitionContext { - return 0.75; + return 0.35; } - (void)animateTransition:(id)transitionContext { @@ -56,7 +56,7 @@ shadowView.transform = self.dismissing ? CGAffineTransformMakeScale(0.01, 1.0) : CGAffineTransformIdentity; shadowView.alpha = self.dismissing ? 1.0 : 0.0; - [UIView animateWithDuration:[self transitionDuration:transitionContext] delay:0.0 usingSpringWithDamping:0.9 initialSpringVelocity:1.0 options:self.animationOpts animations:^{ + [UIView animateWithDuration:[self transitionDuration:transitionContext] delay:0.0 options:[self animationOpts] animations:^{ topView.transform = self.dismissing ? CGAffineTransformMakeTranslation(offset, 0.0) : CGAffineTransformIdentity; shadowView.transform = self.dismissing ? CGAffineTransformIdentity : CGAffineTransformMakeScale(0.01, 1.0); shadowView.alpha = self.dismissing ? 0.0 : 1.0; @@ -68,7 +68,9 @@ } - (UIViewAnimationOptions)animationOpts { - return UIViewAnimationOptionAllowAnimatedContent | UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionLayoutSubviews; + UIViewAnimationOptions opts = self.percentageDriven ? UIViewAnimationOptionCurveLinear : UIViewAnimationOptionCurveEaseInOut; + + return opts | UIViewAnimationOptionAllowAnimatedContent | UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionLayoutSubviews; } @end diff --git a/clients/ios/Classes/NewsBlurAppDelegate.m b/clients/ios/Classes/NewsBlurAppDelegate.m index 6178b49f2..3969c835c 100644 --- a/clients/ios/Classes/NewsBlurAppDelegate.m +++ b/clients/ios/Classes/NewsBlurAppDelegate.m @@ -1371,7 +1371,7 @@ - (void)handleGesture:(UIScreenEdgePanGestureRecognizer *)recognizer { self.safariAnimator.percentageDriven = YES; - CGFloat percentComplete = [recognizer locationInView:self.view].x / self.view.bounds.size.width / 2.0; + CGFloat percentComplete = [recognizer locationInView:self.view].x / self.view.bounds.size.width; switch (recognizer.state) { case UIGestureRecognizerStateBegan: