@hanwha-ss1/plugin 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,20 @@ public class Plugin: CAPPlugin {
16
16
  override public func load() {
17
17
  // 문서뷰어 요청 이벤트
18
18
  NotificationCenter.default.addObserver(self, selector: #selector(handleDocumentViewRequest(_:)), name: .documentViewRequest, object: nil)
19
+
20
+ // keyboard event
21
+ NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboard(_:)), name: UIResponder.keyboardDidShowNotification, object: nil)
22
+ NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboard(_:)), name: UIResponder.keyboardWillShowNotification, object: nil)
23
+ NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboard(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
24
+ NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboard(_:)), name: UIResponder.keyboardDidHideNotification, object: nil)
25
+ }
26
+ @objc func handleKeyboard(_ notification: Notification) {
27
+
28
+ //calc keyboard height
29
+ let userInfo = notification.userInfo!
30
+ let keyboardSize = (userInfo[UIResponder.keyboardFrameEndUserInfoKey] as! NSValue).cgRectValue.size
31
+ // data 매개변수에 keyboardsize를 전달
32
+ self.notifyListeners(notification.name.rawValue, data: ["size": keyboardSize.height])
19
33
  }
20
34
 
21
35
  @objc func handleDocumentViewRequest(_ notification: Notification) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanwha-ss1/plugin",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Plugin",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",