Created
April 24, 2010 20:40
-
-
Save nst/377929 to your computer and use it in GitHub Desktop.
Objective-C category to ease NSManagedObject usage with a single context (.h)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <CoreData/CoreData.h> | |
@interface NSManagedObject (NST) | |
+ (NSManagedObjectContext *)moc; | |
+ (NSManagedObjectModel *)mom; | |
+ (NSEntityDescription *)entity; | |
+ (NSFetchRequest *)allFetchRequest; | |
+ (NSArray *)allObjects; | |
+ (NSUInteger)allObjectsCount; | |
+ (id)create; | |
- (NSManagedObjectContext *)moc; | |
- (BOOL)save; | |
- (void)deleteObject; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment