This repository was archived by the owner on Feb 21, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -232,15 +232,17 @@ - (void)loadTableItems:(NSArray *)tableItems {
232
232
233
233
#pragma mark - Network Table Loading
234
234
235
- - (void )loadTableFromResourcePath : (NSString *)resourcePath {
236
- NSAssert (self.objectManager, @" Cannot perform a network load without an object manager " );
237
- [self loadTableWithObjectLoader: [ self .objectManager loaderWithResourcePath: resourcePath] ];
235
+ - (void )loadTableFromResourcePath : (NSString *)resourcePath
236
+ {
237
+ [self loadTableFromResourcePath: resourcePath usingBlock: nil ];
238
238
}
239
239
240
- - (void )loadTableFromResourcePath : (NSString *)resourcePath usingBlock : (void (^)(RKObjectLoader *loader))block {
241
- RKObjectLoader* theObjectLoader = [self .objectManager loaderWithResourcePath: resourcePath];
242
- block (theObjectLoader);
243
- [self loadTableWithObjectLoader: theObjectLoader];
240
+ - (void )loadTableFromResourcePath : (NSString *)resourcePath usingBlock : (void (^)(RKObjectLoader *loader))block
241
+ {
242
+ NSAssert (self.objectManager, @" Cannot perform a network load without an object manager" );
243
+ RKObjectLoader *objectLoader = [self .objectManager loaderWithResourcePath: resourcePath];
244
+ if (block) block (objectLoader);
245
+ [self loadTableWithObjectLoader: objectLoader];
244
246
}
245
247
246
248
#pragma mark - Forms
You can’t perform that action at this time.
0 commit comments