File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,10 @@ public class RxKeyboard: NSObject {
29
29
/// Same with `visibleHeight` but only emits values when keyboard is about to show. This is
30
30
/// useful when adjusting scroll view content offset.
31
31
public let willShowVisibleHeight : Driver < CGFloat >
32
-
32
+
33
+ /// An observable visibility of keyboard. Emits keyboard visibility
34
+ /// when changed keyboard show and hide.
35
+ public let isHidden : Driver < Bool >
33
36
34
37
// MARK: Private
35
38
@@ -55,7 +58,7 @@ public class RxKeyboard: NSObject {
55
58
}
56
59
. filter { state in state. isShowing }
57
60
. map { state in state. visibleHeight }
58
-
61
+ self . isHidden = self . visibleHeight . map ( { $0 == 0.0 } ) . distinctUntilChanged ( )
59
62
super. init ( )
60
63
61
64
// keyboard will change frame
You can’t perform that action at this time.
0 commit comments