Attributes

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. ...

Get Xcode 5 Start to Finish: iOS and OS X Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.