Last active
August 29, 2015 14:12
-
-
Save mauriciord/dbf2f45bce44af8aa218 to your computer and use it in GitHub Desktop.
Código retirado do livro que está com erro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { | |
let row = indexPath.row | |
let meal = meals[row] | |
var cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: nil) | |
cell?.textLabel?.text = meal.name | |
return cell! | |
} |
UITableViewCell? does not have a member named 'textLabel' na linha:
cell.textLabel?.text = "guilherme"
return cell
Value of optional type 'UITableViewCell?' not unwrapped; did you mean to use '!' or '?' ?
Meu Xcode é o 6.1, devo atualizar para o 6.2 ?
Atualiza sim, pois é só questão de tempo para parar de funcionar na sua máquina...
Deu certo ! :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
É o do último Xcode (6.2 beta). A variável textLabel virou um optional, isso?