insert and modify a record in an entity using Core Data

Posted by aminfar on Stack Overflow See other posts from Stack Overflow or by aminfar
Published on 2010-04-09T07:20:18Z Indexed on 2010/04/10 0:33 UTC
Read the original article Hit count: 693

I tried to find the answer of my question on the internet, but I could not. I have a simple entity in Core data that has a Value attribute (that is integer) and a Date attribute. I want to define two methods in my .m file.

First method is the ADD method. It takes two arguments: an integer value (entered by user in UI) and a date (current date by default). and then insert a record into the entity based on the arguments.

Second method is like an increment method. It uses the Date as a key to find a record and then increment the integer value of that record.

I don't know how to write these methods. (assume that we have an Array Controller for the table in the xib file)

© Stack Overflow or respective owner

Related posts about nsarraycontroller

Related posts about core-data