1
resposta

Problema no cast (Could not cast value of type 'UITableViewCell')Na aula 2 da parte 1: Criando células customizadas

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! TableViewCell

(as! TableViewCell) da um erro: Could not cast value of type 'UITableViewCell' (0x7fff898f6850) to 'Alura_Viagens.TableViewCell' (0x10b62f7d0).

Já comparei o código e esta idêntico ao do professor, mas simplesmente não roda.

1 resposta

Olá, tudo bem ?

Vi que sua dúvida foi aberta já tem um tempo :(

Será que conseguiu resolver ? :D

Se sim compartilha conosco como fez!

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