import UIKit class MasterViewController: UITableViewController { var objects = [String]() var allWords = [String]() let object = objects[indexPath.row] cell.textLabel!.text = object override func awakeFromNib() { super.awakeFromNib() } override func viewDidLoad() { super.viewDidLoad() func startGame() { allWords.shuffle() title = allWords[0] objects.removeAll(keepCapacity: true) tableView.reloadData() } if let startWordsPath = NSBundle.mainBundle().pathForResource(start, ofType: txt) { if let startWords = NSString(contentsOfFile: startWordsPath, usedEncoding: nil, error: nil) { allWords = startWords.componentsSeparatedByString(n) as! [String] } } else { allWords = [silkworm] } startGame() / self.navigationItem.leftBarButtonItem = self.editButtonItem() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() / } / override func numberOfSectionsInTableView(tableView: UITableView) -> Int { return 1 } override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> I
3
0
395