Text("Hello, world!")
.textSelection(.enabled)
.padding()
Whan i press the "Hello, world!" and select the copy, it nerver copy any thing
Text("Hello, world!")
.textSelection(.enabled)
.padding()
Whan i press the "Hello, world!" and select the copy, it nerver copy any thing
This appears to be an iOS bug. I got the same issue on an iOS 15.2.1 device but not on iOS 16 simulator. A workaround:
Text($someText)
.contextMenu(ContextMenu(menuItems: {
Button("Copy", action: {
UIPasteboard.general.string = someText
})
}))