Search code examples
iosparse-platformrowaddition

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?


Solution

  • As mentionned in 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