¡@

Home 

2014/10/15 ¤U¤È 10:13:38

iphone Programming Glossary: savedtext

Save and Load Data - CoreData

http://stackoverflow.com/questions/4177398/save-and-load-data-coredata

file Do I need to use this code or does this just demonstrate what entities and properties I need DatedText savedText String dateSaved Date This line says 'mo' is undeclared FIXED newDatedText mo NSEntityDescription insertNewObjectForEntityForName.. is the text I want save And the 'aDateObject' is the date in my UIDatePicker newDatedText setValue someText forKey @ savedText newDatedText setValue aDateObject forKey @ dateSaved Request for member 'moc' in something not a structure or union NSEntityDescription.. To start you need a data model to reflect what you want to save in this case some text and a date. So DatedText savedText String dateSaved Date To create a new DatedText object without a custom class do NSManagedObject newDatedText newDatedText..

DatePicker Stopping CoreData Work

http://stackoverflow.com/questions/4326303/datepicker-stopping-coredata-work

@ fetchError @ details @ fetchError fetchError.userInfo noteTextView.text fetchedObjs objectAtIndex 0 valueForKey @ savedText And this to save the note NSManagedObject newDatedText newDatedText NSEntityDescription insertNewObjectForEntityForName.. @ DatedText inManagedObjectContext self.managedObjectContext newDatedText setValue noteTextView.text forKey @ savedText newDatedText setValue datePicker.date forKey @ dateSaved NSError saveError nil self.managedObjectContext save saveError..