From 91cb582367cd1303654fac2588b99808c53f0a9d Mon Sep 17 00:00:00 2001 From: Martin Straub Date: Wed, 11 Mar 2020 14:26:17 +0100 Subject: [PATCH] Revert "fix safeAreaInsets for iOS 11" This reverts commit 77814dc61a2715a76f6f537d6de44e613d927060. We're using the parallax header on the very top of one of our screens. This change leads to a top offset (44pt) on newer "notch devices" as we don't want to constraint to the safeArea but, to the very top of the screen. --- ParallaxHeader/ParallaxHeader.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ParallaxHeader/ParallaxHeader.swift b/ParallaxHeader/ParallaxHeader.swift index 361ecaf..49483f2 100644 --- a/ParallaxHeader/ParallaxHeader.swift +++ b/ParallaxHeader/ParallaxHeader.swift @@ -436,10 +436,7 @@ public class ParallaxHeader: NSObject { return } let minimumHeight = min(self.minimumHeight, self.height) - var relativeYOffset = scrollView.contentOffset.y + scrollView.contentInset.top - height - if #available(iOS 11.0, *) { - relativeYOffset += scrollView.safeAreaInsets.top - } + let relativeYOffset = scrollView.contentOffset.y + scrollView.contentInset.top - height let relativeHeight = -relativeYOffset let frame = CGRect(