May 2014
Intermediate to advanced
624 pages
19h 43m
English
So now you have Game and Passer entities, but they don’t hold any data. Entities are aggregates of simple data; these are attributes.
3. With Game still selected, click the + button at the bottom of the Attributes list. A new attribute appears in the table with its name ready for editing.
4. Name the new attribute whenPlayed. You’ll notice that the Type column for whenPlayed says it is of Undefined type. That’s undesirable, but you’ll take care of that soon.
5. Instead, create some more attributes: attempts, completions, interceptions, ourScore, ourTeam, theirScore, theirTeam, touchdowns, and yards. You’ll find you have to chase the attributes around. When you change the name, Xcode sorts the new attribute into alphabetical order. ...