You may consider implementing it like this:
Text(readOnlyTextString)
.contextMenu {
Button(action: {
UIPasteboard.general.string = readOnlyTextString
}) {
Text("Copy")
}
}
Post
Replies
Boosts
Views
Activity
Try adding the navigationViewStyle modifier with StackNavigationViewStyle() on your NavigationView (instead of using the DefaultNavigationViewStyle() or DoubleColumnNavigationViewStyle() ) and see if the issue goes away.
Should look something like this in code:
NavigationView{
/*other embedded views*/
}
.navigationViewStyle(StackNavigationViewStyle())
If this navigation style suits you for navigating across your views, especially on larger screens, you should be good