RKDynamicMapping 没有可见的@interface 声明选择器 setObjectMapping: whenValueOfKeyPath: isEqualTo - Restkit 0.2
No visible @interface for RKDynamicMapping declares the selector setObjectMapping: whenValueOfKeyPath: isEqualTo - Restkit 0.2
您好,我正在尝试在我的动态映射对象上调用 setObjectMapping: whenValueOfKeyPath: isEqualTo。但它给了我这个错误
RKDynamicMapping 的可见@interface 声明选择器 setObjectMapping: whenValueOfKeyPath: isEqualTo
RKDynamicMapping* dynamicMapping = [RKDynamicMapping new];
[dynamicMapping setObjectMapping:girlMapping whenValueOfKeyPath:@"type" isEqualTo:@"Girl"];
我哪里做错了?它在 RestKit 0.2 中被删除了吗?
我终于找到了解决办法。我们可以使用 RKDynamicMapping 对象的 addMatcher: matcherWithKeyPath: expectedValue: ObjectMapping 属性
[dynamicMapping addMatcher:[RKObjectMappingMatcher matcherWithKeyPath:@"type" expectedValue:@"Girl" objectMapping:girlMapping]];
您好,我正在尝试在我的动态映射对象上调用 setObjectMapping: whenValueOfKeyPath: isEqualTo。但它给了我这个错误
RKDynamicMapping 的可见@interface 声明选择器 setObjectMapping: whenValueOfKeyPath: isEqualTo
RKDynamicMapping* dynamicMapping = [RKDynamicMapping new];
[dynamicMapping setObjectMapping:girlMapping whenValueOfKeyPath:@"type" isEqualTo:@"Girl"];
我哪里做错了?它在 RestKit 0.2 中被删除了吗?
我终于找到了解决办法。我们可以使用 RKDynamicMapping 对象的 addMatcher: matcherWithKeyPath: expectedValue: ObjectMapping 属性
[dynamicMapping addMatcher:[RKObjectMappingMatcher matcherWithKeyPath:@"type" expectedValue:@"Girl" objectMapping:girlMapping]];