You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 79b2ccf
Browse filesBrowse the repository at this point in the historyBrowse files
index 5c4e0da4292b15d3a27b5ea1555f11452a470815..4d8abe3c4fc45bda48c2958bc9ca933c77f2cc47 100644
173
+
index 5c4e0da4292b15d3a27b5ea1555f11452a470815..475a99b2a3b1800c9d3e3e5f77a64f552fa35828 100644
174
174
--- a/ios/Shared/MenuViewImplementation.swift
175
175
+++ b/ios/Shared/MenuViewImplementation.swift
176
176
@@ -60,17 +60,46 @@ public class MenuViewImplementation: UIButton {
@@ -222,7 +222,7 @@ index 5c4e0da4292b15d3a27b5ea1555f11452a470815..4d8abe3c4fc45bda48c2958bc9ca933c
222
222
func setup () {
223
223
let menu = UIMenu(title: _title,
224
224
identifier: nil,
225
-
@@ -86,8 +115,98 @@ public class MenuViewImplementation: UIButton {
225
+
@@ -86,8 +115,102 @@ public class MenuViewImplementation: UIButton {
226
226
}
227
227
}
228
228
@@ -309,19 +309,23 @@ index 5c4e0da4292b15d3a27b5ea1555f11452a470815..4d8abe3c4fc45bda48c2958bc9ca933c
309
309
+ if let existing = longPressInteraction {
310
310
+ existing.view?.removeInteraction(existing)
311
311
+ }
312
-
+ let interaction = UIContextMenuInteraction(delegate: self)
312
+
+ // UIControl's built-in interaction presents a compact menu that
313
+
+ // preserves the keyboard; a separate view interaction presents a
314
+
+ // rich context menu and temporarily hides it.
315
+
+ guard let interaction = self.contextMenuInteraction else { return }
313
316
+ host.addInteraction(interaction)
314
317
+ longPressInteraction = interaction
315
318
+ return
316
319
+ }
317
320
+ if let existing = longPressInteraction {
318
321
+ existing.view?.removeInteraction(existing)
322
+
+ self.addInteraction(existing)
319
323
+ longPressInteraction = nil
320
324
+ }
321
325
}
322
326
323
327
public override func reactSetFrame(_ frame: CGRect) {
324
-
@@ -124,4 +243,8 @@ public class MenuViewImplementation: UIButton {
328
+
@@ -124,4 +247,8 @@ public class MenuViewImplementation: UIButton {
325
329
@objc func sendMenuOpen() {
326
330
// NO-OP (should be overriden by parent)
327
331
}
@@ -379,7 +383,7 @@ index e6509355275596c451f9d082223cc16bfe504e1a..dd16e1a7403970cc3a404355f95ed995
379
383
actionsHash: string; // just a workaround to make sure we don't have to manually compare MenuActions manually in C++ (since it's a struct and that's a pain)
0 commit comments