iphone - Where should I keep Core Data fetches and convenience methods? -


I have many feature methods that fetch for my core data entities. For example, a method that is currently active Gives activities, or a time interval between a full-fledged activity or a customer if a customer is there. I have methods of facilitating the initiation and addition of institutions with various methods.

I have a data model singleton class which is a two-to-class class to start core data and get NSMD object content, etc.

Is this data model better in these sub-classes in classrooms in singleton class, or in each relevant unit? I do not think there is a true path here, but I would like opinions and experience. Thanks!

I will add them to the class on which they work. To do this, I will first generate class files for your organizations (select institutions in the editor, then File> Newfile> Nsmanyed Object).

Then, simply enter the methods in class files, such as:

 + [activation activation]; - [activity interactivity: (activity *) other]; + [Activity activity with different properties]; // (plus a related initWithVariousAttributes) 

The general rule I give is that if the method runs on a specific class, then insert the method into that class. =)


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -