April 2017
Intermediate to advanced
316 pages
9h 33m
English
We will need to define two IBAction, one to add a new item to the list and the other to filter the items:
// MARK: Actions extension MasterViewController { @IBAction func addTapped(_ sender: UIBarButtonItem) { let alertController = UIAlertController(title: "Create", message: "Create a new todo item", preferredStyle: .alert) alertController.addTextField { textField in textField.placeholder = "Id" } alertController.addTextField { textField in textField.placeholder = "Name" } alertController.addTextField { textField in textField.placeholder = "Description" } alertController.addTextField { textField in textField.placeholder = "Notes" } alertController.addAction(UIAlertAction(title: "Cancel", style: .cancel) { _ ...Read now
Unlock full access