JacobSiegel JacobSiegel - 6 months ago 22
Swift Question

How to reloadData in class which implements UITableViewDataSource and UITableViewDelegate protocols?(Swift)

So I understand that if I was using a TableViewController class I could use:

self.tableView.reloadData()


Although, this doesn't work with a class that conforms to certain tableView protocols.

How would I do this? Thanks in advance.

Answer

Exactly the same way (although view controllers that are not UITableViewControllers will not have a tableView property unless you define it and connect it yourself.

Comments