Skip to content

Commit

Permalink
Add a documentation for gestureView API
Browse files Browse the repository at this point in the history
  • Loading branch information
devxoul committed May 4, 2017
1 parent 347d29d commit 7668dd1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

- <a name="tip-app-extension" href="#tip-app-extension">🔗</a> **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
Expand Down

0 comments on commit 7668dd1

Please sign in to comment.