简体   繁体   English

Parse.com以编程方式向类添加一行

[英]Parse.com adding a row to a class programmatically

I have a class called "Groups". 我有一个名为“群组”的班级。 I want a user to be able to create a group in the app. 我希望用户能够在应用程序中创建一个组。 Is there an "addRow" feature with parse so that it creates a new row in the Parse class when a method is called in the app? 是否存在带解析的“addRow”功能,以便在应用程序中调用方法时在Parse类中创建新行?

As mentionned in doc: 正如在doc中提到的那样:

PFObject *newGroup = [PFObject objectWithClassName:@"Groups"];
newGroup[@"propertyName"] = propertyValue;
[newGroup saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error)
{
    if(error)
        NSLog(@"Error saving %@", error);
    else
        NSLog(@"Successfully added a group");
}];

More details here 更多细节在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM