From 347a04fe1e2c020b80e45f06d5248df1dd1f3d75 Mon Sep 17 00:00:00 2001 From: Diogo Autilio Date: Sun, 22 Sep 2024 13:09:58 -0300 Subject: [PATCH] Fix compilation issue for iOS versions older than 11.0 --- Sources/SketchKit/KeyboardLayoutGuide.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SketchKit/KeyboardLayoutGuide.swift b/Sources/SketchKit/KeyboardLayoutGuide.swift index ea26ab9..55b1076 100644 --- a/Sources/SketchKit/KeyboardLayoutGuide.swift +++ b/Sources/SketchKit/KeyboardLayoutGuide.swift @@ -71,7 +71,7 @@ final class KeyboardLayoutGuide: LayoutGuide { @objc private func adjustKeyboard(_ notification: Notification) { if var height = notification.keyboardHeight, let duration = notification.animationDuration { - if height > 0, let bottom = owningView?.safeAreaInsets.bottom { + if #available(iOS 11.0, *), height > 0, let bottom = owningView?.safeAreaInsets.bottom { height -= bottom } heightConstraint?.constant = height