I had an Error while changing tabs on iPhone App

Hi Guys. I was trying to change tabs on iOS app test, to show the cell returns. But I Get the error

Dat’s the code I wrote :slight_smile:

import UIKit

class PerformanceViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {

var actosPerf = ["Correr", "Nadar", "Pular", "Yoga"]


func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    return actosPerf.count
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let cell:UITableViewCell = UITableViewCell(style:  UITableViewCell.CellStyle.default, reuseIdentifier: "Teste")
    cell.textLabel!.text = actosPerf[indexPath.item]
    return cell  
}


override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
}

}

But a get the following error

:

Any help of what must be wrong?

Thanks in Advance

AJ :angola:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.