From 7668dd1740ee90bb6e5574b34269f9b303601d8b Mon Sep 17 00:00:00 2001 From: Suyeol Jeon Date: Thu, 4 May 2017 22:01:43 +0900 Subject: [PATCH] Add a documentation for gestureView API --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index dfa5f3a..7c1dfb8 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,16 @@ RxKeyboard.instance.frame > **Note**: In real world, you should use `setNeedsLayout()` and `layoutIfNeeded()` with animation block. See the [example project](https://github.com/RxSwiftCommunity/RxKeyboard/blob/master/Example/Sources/ViewControllers/MessageListViewController.swift#L92-L105) for example. +- 🔗 **I want to use RxKeyboard in App Extension.** + + App Extesion doesn't allow the `UIApplication.shared` API so the pan gesture recognizer cannot automatically track the interactive keybord dismissing. You have to do something manually in the App Extension target: setting `gestureView`. + + ```swift + // ShareViewController.swift + RxKeyboard.instance.gestureView = self.view // add this line on `viewDidLoad()` + RxKeyboard.instance.visibleHeight.drive(...) + ``` + - Anything else? Please open an issue or make a Pull Request. ## Dependencies