Copiei o código e ele fala que nao precisa colocar a palavra override. O overrride só fica no viewDidLoad.`. Sem override não aparece erro nenhum, mas a tela do simulador fica branca. Eu coloquei o view Controller coo is initial View Controller. O que eu fiz de errado?
//
// ViewController.swift
// table-dynamic-meal
//
// Created by Veronica Segal on 25/09/17.
// Copyright © 2017 Veronica Segal. All rights reserved.
//
import UIKit
class ViewController: UITableViewController {
let meals = ["pizza", "sushi", "churrasco", "brigadeiro"]
override func viewDidLoad() {
super.viewDidLoad()
print("Tela carregada com sucesso!")
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return meals.count
}
func tableView(_ tableView: UITableView, cellForRowAt
indexPath: IndexPath) -> UITableViewCell {
let row = indexPath.row
let meal = meals[row]
let cell = UITableViewCell(style: UITableViewCellStyle.default, reuseIdentifier: nil)
cell.textLabel?.text = meal
return cell
}}
}