I'm new to SwiftUI and iOS and trying to investigate an issue in an existing codebase.
There is a Text view that has a contextMenu attached for copying and pasting from the clip board. The issue I'm having is if the text field is empty the context menu doesn't appear.
This would make sense for copying but obviously if a user has copied something they want to paste into the empty input field
Is this by design or am I missing something?
Text("")
.contextMenu {
Button("do something") {
}
}
In the above example the contextMenu won't appear - is there a way to trigger the context menu, or would you implement paste differently here?
Many thanks