From 953cb3f030c8a7b5024346c898a73cf7af0d3cf6 Mon Sep 17 00:00:00 2001 From: Brendan Lee Date: Thu, 8 Feb 2018 21:29:23 -0500 Subject: [PATCH] Fix for layout problems created by changing the panelInsetTop to a non-default value. #165 --- Pulley.podspec | 2 +- PulleyLib/PulleyViewController.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Pulley.podspec b/Pulley.podspec index 74f1cc7..27c9bb9 100644 --- a/Pulley.podspec +++ b/Pulley.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'Pulley' - s.version = '2.2.6' + s.version = '2.2.7' s.summary = 'A library to imitate the iOS 10 Maps UI.' # This description is used to generate tags and improve search results. diff --git a/PulleyLib/PulleyViewController.swift b/PulleyLib/PulleyViewController.swift index bb2a8ef..f1901c7 100755 --- a/PulleyLib/PulleyViewController.swift +++ b/PulleyLib/PulleyViewController.swift @@ -299,7 +299,7 @@ open class PulleyViewController: UIViewController, PulleyDrawerViewControllerDel } /// When in 'leftSide' displayMode, this is used to calculate the top inset from the edge of the screen. - @IBInspectable public var panelInsetTop: CGFloat = 10.0 { + @IBInspectable public var panelInsetTop: CGFloat = 30.0 { didSet { if self.isViewLoaded { @@ -935,7 +935,7 @@ open class PulleyViewController: UIViewController, PulleyDrawerViewControllerDel let lowestStop = [(self.view.bounds.size.height - topInset - safeAreaTopInset), collapsedHeight, partialRevealHeight].min() ?? 0 - drawerContentContainer.frame = CGRect(x: 0.0, y: drawerScrollView.bounds.height - lowestStop - panelInsetTop, width: drawerScrollView.bounds.width, height: drawerScrollView.contentOffset.y + lowestStop + bounceOverflowMargin - panelInsetTop) + drawerContentContainer.frame = CGRect(x: 0.0, y: drawerScrollView.bounds.height - lowestStop , width: drawerScrollView.bounds.width, height: drawerScrollView.contentOffset.y + lowestStop + bounceOverflowMargin) drawerBackgroundVisualEffectView?.frame = drawerContentContainer.frame drawerShadowView.frame = drawerContentContainer.frame