2
respostas

UITableViewCellStyle não existe.

No curso Swift parte 2 aula 01 (tópico - Uma tabela dinâmica e sobrescrevendo eventos de um componente de view), é utilizado o UITableViewCellStyle, porém, na versão que estou utilizando do xcode, diz que não existe. gostaria de saber se há alguma outra função que a representa, ou se há algum outro método de tentar fazer o que o professor estava tentando fazer.

indexPath: IndexPath) -> UITableViewCell {
    let row = indexPath.row
    let meal = meals[row]
    let cell = UITableViewCell(style: UITableViewCellStyle.Default,
        reuseIdentifier:nil)
    return cell
    }
2 respostas

Atualmente fica da seguinte forma: UITableViewCell.CellStyle.default

Oi Mercides, tudo bem?

Você pode utilizar dessa forma também:

let cell = UITableViewCell(style: .default, reuseIdentifier: nil)

Abs.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software