Minor fixes for different setups
This commit is contained in:
parent
ab74d0360c
commit
679d5caef1
|
@ -40,7 +40,7 @@
|
||||||
return delta;
|
return delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (normalizedY < 0)
|
if (normalizedY < -FLT_EPSILON)
|
||||||
{
|
{
|
||||||
CGRect frame = self.scrollView.frame;
|
CGRect frame = self.scrollView.frame;
|
||||||
frame = UIEdgeInsetsInsetRect(frame, insets);
|
frame = UIEdgeInsetsInsetRect(frame, insets);
|
||||||
|
|
|
@ -267,6 +267,9 @@ static void * const kTLYShyNavBarManagerKVOContext = (void*)&kTLYShyNavBarManage
|
||||||
self.resistanceConsumed = 0;
|
self.resistanceConsumed = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GTH: Calculate the exact point to avoid expansion resistance
|
||||||
|
// CGFloat statusBarHeight = [self.statusBarController calculateTotalHeightRecursively];
|
||||||
|
|
||||||
// 5 - Apply resistance
|
// 5 - Apply resistance
|
||||||
// 5.1 - Always apply resistance when contracting
|
// 5.1 - Always apply resistance when contracting
|
||||||
if (self.contracting)
|
if (self.contracting)
|
||||||
|
@ -277,7 +280,7 @@ static void * const kTLYShyNavBarManagerKVOContext = (void*)&kTLYShyNavBarManage
|
||||||
deltaY = MIN(0, availableResistance + deltaY);
|
deltaY = MIN(0, availableResistance + deltaY);
|
||||||
}
|
}
|
||||||
// 5.2 - Only apply resistance if expanding above the status bar
|
// 5.2 - Only apply resistance if expanding above the status bar
|
||||||
else if (self.scrollView.contentOffset.y > -[self.statusBarController calculateTotalHeightRecursively])
|
else if (self.scrollView.contentOffset.y > 0)
|
||||||
{
|
{
|
||||||
CGFloat availableResistance = self.expansionResistance - self.resistanceConsumed;
|
CGFloat availableResistance = self.expansionResistance - self.resistanceConsumed;
|
||||||
self.resistanceConsumed = MIN(self.expansionResistance, self.resistanceConsumed + deltaY);
|
self.resistanceConsumed = MIN(self.expansionResistance, self.resistanceConsumed + deltaY);
|
||||||
|
|
Loading…
Reference in New Issue