Lost, Gravity, and Persistence

Mobile Makers Day 17 — Core Data, NSManagedObjects, NSFetchRequest

Robert Figueras
my iOS Dev Journal

--

Today was a good day, much better than yesterday! ;) We started a two part series on Core Data and it is very exciting. Really relatively easy to create a ‘database’-like structure using Core Data.

The basics of it, as I understand so far, are that you create data model entities and relationships. Then you access the singleton NSManagedObjectContext, create NSManagedObjects based on entities defined in the data model, save them to the NSManagedObjectContext and then access them via NSFetchRequests.

The challenge to day was to create a Lost Database application. This was a great exercise for reinforcing the concepts of persistence and Core Data. It also was a good exercise in trying to design for a UX. Getting to the last step of being able to filter, I did a lot of back and forth on design and had to duplicate alot of my code. Also, the idea of seeding data was a fairly new concept and I didn’t quite tackle it the way I should have. I’m going to try to go back to refactor it, so that means, I probably in reality will not. ☹

Cool things I learned today included creating an adjusting view scroll animation for a full page text form. It’s a bit quirky but it works fairly well.

--

--

Robert Figueras
my iOS Dev Journal

in order of importance: Papa, Hubby, Son, Sib, iOS Developer, Software Consultant, Musician, Entrepreneur Wannabe