Re-create reaction and context menu in SwiftUI

  Kiến thức lập trình

In SwiftUI, it’s super easy to make the menu that drops below a selected view (in the image the one with Reply, Add Sticker, etc). You just do .contextMenu { views } on your view.

Doing the emoji popup that shows above the selected view seems to be much more difficult. Is there some hidden incantation in SwiftUI that makes this easy? Or does it require a large solution that doesn’t use contextMenu at all? Anybody done this?

enter image description here