Ao tentar conectar a TableView ao View Controller ele retorna : Could not insert outlet connection : Could not find a class View Controller in the language swift
import UIKit
class ViewController: UIViewController, UITableViewDataSource {
let listaViagens:Array<String> = ["Rio de Janeiro", "Manaus","Porto Alegre"]
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return listaViagens.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: <#T##IndexPath#>)
cell.textLabel?.text = listaViagens[indexPath.row]
return cell
}
}