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.
2 parents c532cc3 + 9c72dc3 commit 63f6377Copy full SHA for 63f6377
Sources/RxKeyboard/RxKeyboard.swift
@@ -63,7 +63,7 @@ public class RxKeyboard: NSObject, RxKeyboardType {
63
)
64
let frameVariable = BehaviorRelay<CGRect>(value: defaultFrame)
65
self.frame = frameVariable.asDriver().distinctUntilChanged()
66
- self.visibleHeight = self.frame.map { UIScreen.main.bounds.height - $0.origin.y }
+ self.visibleHeight = self.frame.map { UIScreen.main.bounds.intersection($0).height }
67
self.willShowVisibleHeight = self.visibleHeight
68
.scan((visibleHeight: 0, isShowing: false)) { lastState, newVisibleHeight in
69
return (visibleHeight: newVisibleHeight, isShowing: lastState.visibleHeight == 0 && newVisibleHeight > 0)
0 commit comments