Skip to content

Instantly share code, notes, and snippets.

@saoudrizwan
Last active August 19, 2017 23:08
Show Gist options
  • Save saoudrizwan/3b128863f083e80b61cff1c2429a0a6f to your computer and use it in GitHub Desktop.
Save saoudrizwan/3b128863f083e80b61cff1c2429a0a6f to your computer and use it in GitHub Desktop.
let saveMenuItem = UIMenuItem(title: "Save", action: #selector(saveTapped))
let deleteMenuItem = UIMenuItem(title: "Delete", action: #selector(deleteTapped))
UIMenuController.shared.menuItems = [saveMenuItem, deleteMenuItem]
@objc func saveTapped() {
// ...
}
@objc func deleteTapped() {
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment