mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 04:20:21 +08:00
Use instancetype in constructors for increased subclassing friendliness
This commit is contained in:
@@ -45,8 +45,7 @@ static RKManagedObjectStore *defaultStore = nil;
|
||||
|
||||
@implementation RKManagedObjectStore
|
||||
|
||||
|
||||
+ (RKManagedObjectStore *)defaultStore
|
||||
+ (instancetype)defaultStore
|
||||
{
|
||||
return defaultStore;
|
||||
}
|
||||
@@ -58,7 +57,7 @@ static RKManagedObjectStore *defaultStore = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (id)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel
|
||||
- (instancetype)initWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
@@ -74,7 +73,7 @@ static RKManagedObjectStore *defaultStore = nil;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)persistentStoreCoordinator
|
||||
- (instancetype)initWithPersistentStoreCoordinator:(NSPersistentStoreCoordinator *)persistentStoreCoordinator
|
||||
{
|
||||
self = [self initWithManagedObjectModel:persistentStoreCoordinator.managedObjectModel];
|
||||
if (self) {
|
||||
|
||||
Reference in New Issue
Block a user