Answer the question
In order to leave comments, you need to log in
How to call UIAlertController when cell is clicked in TableView?
Good afternoon! There is a ViewController with a TableView in it. It is not possible to call UIAlertController when clicking on a cell... Please tell me what could be the reason? Method written before viewDidLoad
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
//создаем алерт контроллер
let actionMenu = UIAlertController(title: nil, message: "Что делаем?", preferredStyle: .ActionSheet)
//создаем действия для контроллера
let cancelAction = UIAlertAction(title: "Отмена", style: .Cancel, handler: nil)
actionMenu.addAction(cancelAction)
//отображаем контроллер
self.presentViewController(actionMenu, animated: true, completion: nil)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question