From 1bdd270618c344efb18a095d76002e90c4aafc8d Mon Sep 17 00:00:00 2001 From: Alek Slater Date: Wed, 11 Mar 2015 12:04:20 +0800 Subject: [PATCH] residual check comparing with FLT_EPSILON instead of 0 to avoid flickering --- TLYShyNavBar/TLYShyViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TLYShyNavBar/TLYShyViewController.m b/TLYShyNavBar/TLYShyViewController.m index 1fb0369..3da6fea 100644 --- a/TLYShyNavBar/TLYShyViewController.m +++ b/TLYShyNavBar/TLYShyViewController.m @@ -116,7 +116,7 @@ const CGFloat contractionVelocity = 300.f; if (self.child && deltaY > 0 && residual > 0) { residual = [self.child updateYOffset:residual]; - self.child.view.hidden = residual - (newYOffset - newYCenter) > 0; + self.child.view.hidden = residual - (newYOffset - newYCenter) > FLT_EPSILON; } return residual;