我似乎能够很好地启动restkit并使用传统的loadobjectsatresourcepath:delegate:方法加载对象。但是,当我引入 block:^{} 时,restkit 每次都会崩溃。
[[RKObjectManager sharedManager] loadObjectsAtResourcePath:@"/api/v1/places" delegate:self block:^(RKObjectLoader* loader) {
loader.objectMapping = [[RKObjectManager sharedManager].mappingProvider objectMappingForClass:[Place class]];
}];
我在日志中得到这个:
2012-05-12 19:07:32.266 App - [RKObjectManagerloadObjectsAtResourcePath:delegate:block:]: unrecognized selector sent to instance 0x3aa2e0
2012-05-12 19:07:32.268 App - *** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[RKObjectManager loadObjectsAtResourcePath:delegate:block:]: unrecognized selector sent to instance 0x3aa2e0'
关于如何解决这个问题的任何想法?谢谢!