Open thecsy opened 3 years ago
I met the same issue and I finally fixed it.
In my case, I had add a new UIWindow in my app then the panGestureRecognizer from RxKeyboard didn't added to the correct window.
Here is my solution by editing source code to make sure I am getting the keyWindow:
if let window = UIApplication.shared.windows.first(where: { (window) -> Bool in window.isKeyWindow}) {
window.addGestureRecognizer(self.panRecognizer)
} else {
UIApplication.rx.didFinishLaunching // when RxKeyboard is initialized before UIApplication.window is created
.subscribe(onNext: { _ in
if let window = UIApplication.shared.windows.first(where: { (window) -> Bool in window.isKeyWindow}) {
window.addGestureRecognizer(self.panRecognizer)
}
}).disposed(by: disposeBag)
}
If you don't want to modify the source code, call RxKeyboard.instance
after setting a new window should solve the issue as well:
window = UIWindow(frame: UIScreen.main.bounds)
window?.makeKeyAndVisible()
RxKeyboard.instance
Hope that could help!
interactive dismiss event is not continuous update keyboard height. just one height Update, in start & end point.
i used storyboard & autolayout. i need continuous visible Keyboard height. how to use ?