ADVANCED CORE DATA
Core data allow us to store data in our app easily. Lets take a look at, how they work.
STEP 1: New project
In xCode: File - new - project - singleview app, tick "use coredata" checkbox and name it "
STEP 2: Data model
file, add new Entity and name it
. Add new attribute, name it
and set the type to transformable
STEP 3: Run class
Lets define our class we will be using in our project.
STEP 4: Saving data
Create new UI with 3 buttons: "Save", "Fetch", "Delete" and connect them to the storyboard.
Assign "save method to the first button" and write the following code:
STEP 5: Fetching data
STEP 6: Erasing data
Regular values (scroll)
Create your own unique website with customizable templates.