From the course: iOS Lean Controllers: 1 Setup, Persistent Data, and Implementation

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Saving new records

Saving new records

- [Instructor] Hi, and welcome back. In the last section Setting Up The Growth Reapplication, we did all the required ground work to set up our application we created the section header with a text field which allows you to insert the data or the shopping list, into the database. We also configured core data and integrated core data in our application. In this section, we are gonna look at how we can persist data, meaning saving data, deleting data, and fetching data. So, let's first start with saving data. We already have the text box or a text field, and I can write something in it like Walmart and press return key. Right now we don't have any delegate method or a function that is listening for the return key event. So, let's go ahead and do that. I'm gonna just say textFiend.delegate equals to self. Alright? And in order to receive the delegate, I have to conform to the UITextFieldDelegate protocol. And now I can use any delegate, alright, of the textField. So let's go ahead and…

Contents