Skip to content

Instantly share code, notes, and snippets.

@hasanalisiseci
Last active February 20, 2020 18:34
Show Gist options
  • Save hasanalisiseci/6bd8a63c47e38e559c127959ea7c41a9 to your computer and use it in GitHub Desktop.
Save hasanalisiseci/6bd8a63c47e38e559c127959ea7c41a9 to your computer and use it in GitHub Desktop.
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let alert = UIAlertController(title: "Fruits", message: "This fruit is \(fruits[indexPath.row])", preferredStyle: UIAlertController.Style.alert)
let okButton = UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil)
alert.addAction(okButton)
self.present(alert, animated: true, completion: nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment