PFObject如何允许像NSMutableDictionary这样的下标?

时间:2015-09-20 14:56:39

标签: objective-c parse-platform objective-c-literals

我正在阅读Parse的iOS开发者指南。 我很困惑,它显示PFObject分配带有下标语法的键。

PFObject *gameScore = [PFObject objectWithClassName:@"GameScore"];
gameScore[@"score"] = @1337;
gameScore[@"playerName"] = @"Sean Plott";
gameScore[@"cheatMode"] = @NO;


PFObject *gameScore = [PFObject objectWithClassName:@"GameScore"];
gameScore[@"score"] = @1337;

首先,我认为PFObject必须延伸NSMutableDictionary,但PFObject仅限NSObject。它的行为方式如NSMutableDictionary

我怎样才能为自己的班级做这件事?

0 个答案:

没有答案