O'Reilly logo

Mastering iOS 10 Programming by Donny Wals

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

UITableViewDelegate and interactions

Up until this point, the ViewController has conformed to UITableViewDelegate but you haven't actually implemented any delegate methods yet. Whenever certain interactions occur in UITableView, such as tapping a cell or swiping on a cell, UITableView will attempt to notify its delegate about the action that has occurred. There are no required methods in the UITableViewDelegate protocol, which is why you could conform to it and act as a delegate without writing any implementation code. However, just implementing a list and doing nothing with it is kind of boring so let's add some features that will make UITableView a little bit more interesting. If you look at the documentation for UITableViewDelegate you'll see ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required