Created
February 20, 2016 18:02
-
-
Save kennylugo/e18422437501090bcb67 to your computer and use it in GitHub Desktop.
TableCellSelection & UIAlertController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { | |
//create option menu | |
let optionMenu = UIAlertController(title: "Option Menu", message: "Select one", preferredStyle: .ActionSheet) | |
//create action | |
let cancelAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel, handler: nil) | |
//add action to menu | |
optionMenu.addAction(cancelAction) | |
//present menu contorller | |
self.presentViewController(optionMenu, animated: true, completion: nil) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment