We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89bf8ef commit 82004a0Copy full SHA for 82004a0
KeyboardLayoutGuide/KeyboardLayoutGuide/Keyboard+LayoutGuide.swift
@@ -118,7 +118,8 @@ extension Notification {
118
}
119
// Weirdly enough UIKeyboardFrameEndUserInfoKey doesn't have the same behaviour
120
// in ios 10 or iOS 11 so we can't rely on v.cgRectValue.width
121
- return (UIApplication.shared.keyWindow?.bounds.height)! - v.cgRectValue.minY
+ let screenHeight = UIApplication.shared.keyWindow?.bounds.height ?? UIScreen.main.bounds.height
122
+ return screenHeight - v.cgRectValue.minY
123
124
125
0 commit comments