views:

20

answers:

1

If I have a class of type UITableViewController and I am going to add the required delegate methods to that class am I right in thinking I don't need to specify a delegate as the class defaults to using itself?

A: 

I am not quite sure it is a good idea to make a class be its own delegate. Maybe it would work with UITableViewController, but I read that this wouldn't work with UITextField for example, because it intoduces a message loop, see: Problem with TextField set as its own delegate

However, whether you decide on trying or specifying another delegate, you need to adopt the UITableViewControllerDelegate protocol in any case.

Toastor
I think he was talking about setting the delegate of the tableView to the TableViewController. UITableViewController does not have a delegate property anyway.
Brian