UICommandTagShare
A value that identifies a command as a Share menu.
Declaration
let UICommandTagShare: StringDiscussion
To create a Share menu, add UICommandTagShare to the propertyList of a UICommand or UIKeyCommand object.
// Ensure that the builder is modifying the menu bar system.
guard builder.system == UIMenuSystem.main else { return }
let shareCommand = UICommand(title: "Share",
action: #selector(share(_:)),
propertyList: UICommandTagShare)
let shareMenu = UIMenu(title: "", options: .displayInline, children: [shareCommand])
// Insert the menu into the File menu before the Close menu.
builder.insertSibling(shareMenu, beforeMenu: .close)