Swift error - can not invoke initializer for type int with an argument list of type ()?

0

I'm doing a swift 2 course plus the version I'm using is 3, so I'm researching the codes when I have some error to do the fix, plus some I have not found.

Thank you if anyone can help

error: can not invoke initializer for type int with an argument of type ()

func tableView(_ tableView: UITableView, cellForRowAtIndexPath  indexPath: IndexPath) -> UITableViewCell {
	let cell = UITableViewCell(style:UITableViewCellStyle.default, reuseIdentifier:"cell")
	
	let timesTabel = Int(btnSliderValor.value = 20) //erro 
	cell.textLabel?.text = String(timesTabel = indexPath.row)
    return cell
	
}
    
asked by anonymous 15.05.2017 / 19:10

1 answer

0

After reviewing the code, I solved the problem:

func tableView(_ tableView: UITableView, cellForRowAtIndexPath  indexPath: IndexPath) -> UITableViewCell {
    let cell = UITableViewCell(style:UITableViewCellStyle.default, reuseIdentifier:"cell")

    let timesTabel = Int(btnSliderValor.value * 20)
    cell.textLabel?.text = String(timesTabel * (indexPath.row + 1) )
    return cell

}
    
15.05.2017 / 20:23