Stuart Breckenridge Stuart Breckenridge - 6 months ago 44
Swift Question

UITableView - registerClass with Swift

Is anyone else having an issue using the

tableView.registerClass
method with Swift?

It no longer comes in code completion for me (nor can I use it if manually typed) but it is still in the headers...

Code Completion

UITableView headers

Answer

It works for me perfectly.

self.tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")

Exactly as I have it above.