A classe demonstrada abaixo apresenta vários erros no Xcode e a IDE sugere colocar um "_" antes do primeiro parâmetro de cada função, creio que seja uma incompatibilidade da versão do swift.
//
// MealTableViewController.swift
// daily-meal
//
// Created by Renan Ribeiro Brando on 23/10/16.
// Copyright © 2016 Renan Ribeiro Brando. All rights reserved.
//
import UIKit
class MealsTableViewController: UITableViewController {
var meals = [ Meal(name: "Eggplant brownie", happiness: 5),
Meal(name: "Zucchini Muffin", happiness: 3)]
override func tableView(tableView: UITableView,
numberOfRowsInSection section: Int) -> Int {
return meals.count
}
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
}
}