UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Bugged .contextMenu

Forums > SwiftUI

Screen recording of the bugged behavior.

Or as a simple link (since for me, the video doesn't load): https://imgur.com/XyTAhP9

I think the problems are obvious: it jumps from no rounded corners to rounded corners without any animation and sometimes even renders the text twice. This is just a Text with the .contextMenu modifier, nothing special. It's just about the default SwiftUI behavior here... which seems to be bugged. Is there a workaround for this? Adding a solid color background fixed this for me, but is not a suitable fix in my app. Is my best bet here to drop down to UIKit and use a UILabel for this instead?

1      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.