UIMenuController deprecated

Hi, I would like to ask about migration from UIMenuController since it has been deprecated, so I want a context menu work like UIMenuController for UIView, I've found UIEditMenuInteraction but it's only work for UITextView or UITextField and UIContextMenuInteraction which has different appearance with UIMenuController.

So, I want migrate from UIMenuController without change the existing user interface.

Thank You

Answered by Frameworks Engineer in 765235022

UIEditMenuInteraction is supported everywhere and not just in UITextView or UITextField; the two simply have system built-in integrations with the interaction by default. You can always create and manage your own UIEditMenuInteraction to present an edit menu explicitly from any view. You can find out more from our developer documentation for UIEditMenuInteraction, or from the WWDC22 video Adopting desktop-class editing interactions.

Accepted Answer

UIEditMenuInteraction is supported everywhere and not just in UITextView or UITextField; the two simply have system built-in integrations with the interaction by default. You can always create and manage your own UIEditMenuInteraction to present an edit menu explicitly from any view. You can find out more from our developer documentation for UIEditMenuInteraction, or from the WWDC22 video Adopting desktop-class editing interactions.

Thank you for your response @andyl_ , I really appreciate it

UIMenuController deprecated
 
 
Q