我是 Restkit 的新手,基本上需要从 nsurl 网站 moo/api.com(例如 nsurl)中检索这些值。什么是最好的方法。已经声明了属性并进行了对象映射。现在需要帮助返回 nslog 中的值。该类是视图控制器。任何帮助,将不胜感激。
。H
@property (nonatomic, copy) NSString* ID;
@property (nonatomic, copy) NSString* Text;
@property (nonatomic, copy) NSString* author;
.m
- (void)viewDidLoad
{
RKObjectMapping* articleMapping = [RKObjectMapping mappingForClass:[Terms class]];
[articleMapping addAttributeMappingsFromDictionary:@{
@"ID": @"ID",
@"Text": @"Text",
@"author": @"author"
}];
}