Search code examples
iosuitableviewreloaddata

How do I access the UITableView to reloadData?


I'm moving my first stpes in iOS development. I have followed the first part of this tutorial to create a simple table. All fine, but now I would like to change the displayed data using the reloadData method of UITableView.

I keep seeing that if I my controller was a UITableViewController I could just do [self.tableView reloadData], but my controller is a UIViewController that embeds a UITableView.

How can I access the method from the code?


Solution

  • If I understand what you want to do, then you have to make one IBOutlet for your UITableView and connect it with your UITableView and using that you can reload your table with the method you mentioned