I'm unable to find any sample code for the new iOS13 context menus features or UICommand features. I'm curious about how to make all this stuff work together correctly.
Im within UITableView's `contextMenuConfigurationForRowAt` method, and trying to return a UIContextMenuConfiguration with a `UIContextMenuActionProvider
I've tried the following that was taken from a WWDC slide @ 44:33 Modernizing your app for iOS 13.
let actionProvider: UIContextMenuActionProvider = { suggestedActions in
return UIMenu(children: [UIAction(title: "Open in new Window"){ action in },
UIAction(title: "Delete", options:.destructive){ action in}])
}
let config = UIContextMenuConfiguration(identifier: "SO.UNIQUE" as NSCopying, previewProvider: nil, actionProvider: actionProvider)
return config
}
This says that UIMenu doesnt support being init'd with children elements, and only has init(coder:) available.
Is this stuff ready for adoption this beta? There's no mention in the release notes.