## AlertViewController
1. Add below lines
```swift
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
let alertController = UIAlertController(title: "Hint", message: "You have selected row no \(indexPath.row) and section no \(indexPath.section)", preferredStyle: .alert)
let alertAction = UIAlertAction(title: "OK", style: .cancel, handler: nil)
alertController.addAction(alertAction)
present(alertController, animated: true, completion: nil) // UITableViewDelegate
}
```
* Model Alert, it is displayed in the middle of screen and you have no of options to choose from
* ActionSheet -> it comes from below the screen and have only two options
* You can have different action after pressing button in
```swift
let restartAction = UIAlertAction(title: "Restart", style: .default, handler: { UIAlertAction in
self.startOver()
})
```
* Check AlertViewController additinal info on OneNote app