I am addicted to use TableViewController in storyboard whose class directly inherits from UITableViewController and functions like:
- (UITableViewCell *)tabl
Implement UITableViewDataSource
and UITableViewDelegate
protocols in your view controller .h file.
Have an outlet for the UITableView
.
In viewDidLoad
, set the tableView's datasource and delegate to self
since the viewcontroller implements the protocol.
Then, write the cellForRowAtIndexPath
method. It will be getting called.
You have to assign UITableViewDelegate and UITableViewDatasource protocols to your table and implement it. Methods in your question are methods from these protocols and they appears automatically when you use UITableViewController.