Skip to content

Commit

Permalink
Fix compilation issue for iOS versions older than 11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dogo committed Sep 22, 2024
1 parent 176e5b2 commit 347a04f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/SketchKit/KeyboardLayoutGuide.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 347a04f

Please sign in to comment.