top of page

55. Article: ContextMenu in SwiftUI

Writer's picture: Hui WangHui Wang

In UiKit, pressing with 3D Touch enables Peek and Pop to preview content quickly and provide contextual menu actions, creating a great interactive experience. In SwiftUI, we can interact with the popup menu, and using ContextMenu can achieve a similar experience to UiKit. This article will introduce the use of the .contextMenu modifier to trigger the context menu with a long press and combine Menu and Button to add submenus.


References:


ContextMenu in SwiftUI


 

Follow me on:

Comments


Never Miss a Post. Subscribe Now!

I am an iOS developer, and I will share some knowledge related to iOS development from time to time.

Thanks for submitting!

© 2022 by (Foks) Hui Wang

bottom of page