RestKit映射不适用于同一个keyPath

时间:2016-10-14 17:51:10

标签: objective-c xcode8 restkit-0.26.x

我有这段代码:

[RKResponseDescriptor responseDescriptorWithMapping:someMapping
                                                                                method:RKRequestMethodGET
                                                                           pathPattern:[NSString stringWithFormat:@"/%@/some/search", BASE_URL_API]
                                                                               keyPath:@"results"
                                                                           statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)],

                                   [RKResponseDescriptor responseDescriptorWithMapping:someMapping
                                                                                method:RKRequestMethodGET
                                                                           pathPattern:[NSString stringWithFormat:@"/%@/some/:code", BASE_URL_API]
                                                                               keyPath:nil
                                                                           statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)],

并且最后一个工作。我为"结果"添加了一条路线。它没有用。

我在GitHub中添加了对这篇文章的评论

https://github.com/RestKit/RestKit/issues/1489

0 个答案:

没有答案