RW.com: Storyboards Segues Article - Consolidation
So, as mentioned, I need to consolidate this particular article. There was so much code there, I just wanted to look over it one more time and make sense of it all - from the Xcode project. Start Time - 13:05 Let's look at one Swift File at a time. First of all the model - this is what was already created before the article: struct Player { var name : String ? var game : String ? var rating : Int } A simple struct here. Name and game are optional because there may be no value (nil) put in - stops the program from crashing. Rating is an int - a score out of 5. That's interesting as anything could actually be set for it! The rating part wasn't actually covered in this project. Now we have the view file: import UIKit class PlayerCell : UITableViewCell { @IBOutlet weak var gameLabel : UILabel ! @IBOutlet weak var nameLabel : UILabel ! @IBOutlet weak var ratingIma...