ios - UITableView delegate/datasource default value -


Simple question I have seen that when I subclass the UITableViewController, this UITableView is automatically set it's representative / data source in my class. Do I need to manually set the table version rep / datasource for the code worksheet manually or is this expected behavior?

Thanks

Yes this is the official candidate behavior.

This documentation is particularly detailed in the "overview" paragraph:

Overview

UITableViewController The class manages the table view that creates a controller object. This implements the following behavior:

  • [...]

  • A nib file containing a table view Loads, data sources and delegates define those objects in the Nib file (if any) if no nib file is specified or if the Nib file does not define or represents a data source , Then sets the UITableViewController data source and table view itself represents.

    >

Comments