Попытка соответствовать UITableViewDataSource и UITableViewDelegate внутри подкласса Swift UIViewController.
class GameList: UIViewController {
var aTableView:UITableView = UITableView()
override func viewDidLoad() {
super.viewDidLoad()
aTableView.delegate = self
aTableView.dataSource = self
self.view.addSubview(aTableView)
//errors on both lines for not conforming
}
}
Документы говорят, что вы должны соответствовать строке class
после :
, но обычно там, где находится суперкласс. Другой :
не работает. Использование списка с разделителями-запятыми после того, как суперкласс также не работает.
EDIT:
Ответ найден ниже. class GameList: UIViewController, UITableViewDataSource, UITableViewDelegate {
Также необходимо принять все необходимые методы для каждого протокола, который я изначально не выполнял.