Under Project Settings, select the model you would like to edit. Go to the Fields tab and add what’s called a User-Defined Field (UDF).
Name the field and select the data type you want to add to this model. Core Data supports several user-defined data types:
-
Boolean – This adds a checkbox to your data model
-
Date – This data type is for a specific date that’s selected from a date picker
-
FuzzyDate – With a “fuzzy” date, you can set a level of accuracy (year, month, or date). You can also create a date range or enter a description, such as “The Renaissance” or “The 90s”
-
Number – This adds a field for a number
-
RichText – This is a text field with a formatting bar
-
Select – This is a drop down menu. You can create a list of items in the menu, and you can set this field to allow single or multiple values.
-
String – This is for one line of plain (or unformatted) text
-
Text –This is for a longer section of plain (unformatted) text, such as the Notes field or Biography section of the Person model
Once you add and save a field, make sure to save the changes to the record, as well.
You can also set whether a field should be required and/or searchable on Core Data.