Skip to content

Commit 31cd1bf

Browse files
authored
Merge pull request #50 from RxSwiftCommunity/rxkeyboard-protocol
Add RxKeyboardType protocol
2 parents f9943c4 + 2ff4680 commit 31cd1bf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Sources/RxKeyboard/RxKeyboard.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,15 @@ import UIKit
1212
import RxCocoa
1313
import RxSwift
1414

15+
public protocol RxKeyboardType {
16+
var frame: Driver<CGRect> { get }
17+
var visibleHeight: Driver<CGFloat> { get }
18+
var willShowVisibleHeight: Driver<CGFloat> { get }
19+
var isHidden: Driver<Bool> { get }
20+
}
21+
1522
/// RxKeyboard provides a reactive way of observing keyboard frame changes.
16-
public class RxKeyboard: NSObject {
23+
public class RxKeyboard: NSObject, RxKeyboardType {
1724

1825
// MARK: Public
1926

0 commit comments

Comments
 (0)