@hanwha-ss1/plugin 0.6.3-beta.1 → 0.6.3-beta.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.
@@ -3,6 +3,7 @@
3
3
  import UIKit
4
4
  import Foundation
5
5
 
6
+
6
7
  protocol KeyboardMenuDelegate: AnyObject {
7
8
  func menuTapped(_ sender: UIButton)
8
9
  }
@@ -37,13 +38,20 @@ class KeyboardMenu: UIStackView {
37
38
  }
38
39
  //create add button
39
40
  func createAddButton() {
40
- let imgArray = ["todo","img","file","collabo-link","url-link"];
41
+ let imgArray = ["todo.svg","img","file","collabo-link","url-link"];
41
42
 
42
43
 
43
44
  for i in 0..<imgArray.count{
44
45
  let addButton = UIButton()
45
- // aseets 이미지에서 file 이미지 가져와서 사용
46
- addButton.setImage(UIImage(named: imgArray[i]), for: .normal);
46
+ // svg 이미지에서 file 이미지 가져와서 사용
47
+
48
+ let podBundle = Bundle(for: KeyboardMenu.self)
49
+
50
+ let imageSource = UIImage(named: imgArray[i], in: podBundle, compatibleWith: nil);
51
+
52
+
53
+
54
+ addButton.setImage(imageSource, for: .normal);
47
55
  addButton.accessibilityHint = imgArray[i];
48
56
  addButton.backgroundColor = .white
49
57
  addButton.addTarget(self, action: #selector(menuTapped(_:)), for: .touchUpInside)
@@ -61,7 +69,7 @@ class KeyboardMenu: UIStackView {
61
69
 
62
70
  // keyboardMenu.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true
63
71
  // keyboardMenu.heightAnchor.constraint(equalToConstant: 50).isActive = true
64
- //
72
+ //
65
73
 
66
74
 
67
75
  self.isHidden = true;
@@ -88,10 +96,13 @@ class KeyboardMenu: UIStackView {
88
96
 
89
97
  @objc private func keyboardWillHide(_ notification: Notification) {
90
98
  self.isHidden = true;
91
-
99
+ // self.removeFromSuperview();
100
+
101
+ //remove from superview
92
102
  self.bottomConstraint?.constant = 0
93
103
  UIView.animate(withDuration: 0.3) {
94
104
  self.superview?.layoutIfNeeded()
105
+
95
106
  }
96
107
  }
97
108
 
@@ -13,4 +13,5 @@ CAP_PLUGIN(Plugin, "Plugin",
13
13
  CAP_PLUGIN_METHOD(edgeSwipe, CAPPluginReturnPromise);
14
14
  CAP_PLUGIN_METHOD(fileDownload, CAPPluginReturnPromise);
15
15
  CAP_PLUGIN_METHOD(doDisabledCapture, CAPPluginReturnPromise);
16
+ CAP_PLUGIN_METHOD(addKeyboardMenu, CAPPluginReturnPromise);
16
17
  )
@@ -57,7 +57,7 @@ public class Plugin: CAPPlugin {
57
57
  }
58
58
  @objc func addKeyboardMenu(_ call: CAPPluginCall) {
59
59
 
60
- KeyboardMenuPlugin().add(call, self.bridge!);
60
+ KeyboardMenuPlugin().add(call, _bridge: self.bridge!)
61
61
  }
62
62
 
63
63
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanwha-ss1/plugin",
3
- "version": "0.6.3-beta.1",
3
+ "version": "0.6.3-beta.2",
4
4
  "description": "Plugin",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",