Supplying custom menu elements to a UITextView's edit menu

When appending additional UIAction children to the horizontal edit menu UIMenu returned in the delegate method func textView(_ textView: UITextView, editMenuForTextIn range: NSRange, suggestedActions: [UIMenuElement]) -> UIMenu? If the menu is long enough to need an overflow chevron vertical menu (introduced in iOS 26) my UIAction only show either a title or an image not both, is UIAction the right UIMenuElement type to supply here? How to get both the title and the image to appear in the overflow vertical menu?

UIAction and other UIMenuLeaf types like UICommand are the right tools for this. On iOS, both the title and image care expected to be displayed on the expanded edit menu. Could you please file a bug report with a sample project showcasing this issue?

Setting both the title and image on your UIAction (or any other UIMenuElement) should show both the title and image in the expanded context menu when the expansion arrow button is pressed.

If this is not behavior you're seeing, please file a new bug report via Feedback Assistant and attach a sample project that reproduces the issue; reply with the FB # so we can take a look.

Thanks! I'll file the FB and post it here as soon as I get a chance.

Supplying custom menu elements to a UITextView's edit menu
 
 
Q