To save data in parse DB table, create one PFObject and write the information that you want to save to table.
For example - I have a table name "Post" with column names : title, message, postTime. Lets save one record to this table.
PFObject *newObj = [PFObject objectWithClassName:@"Post"];
// In above line className means table name
[newObj setObject:@"New post" forKey:@"title"];
[newObj setObject:@"This is my first post" forKey:@"message"];
[newObj setObject:[NSDate date] forKey:@"postTime"]; // postTime is date type column in table Post
[newObj saveInBackgroundWithBlock:^(BOOL success, NSError *error){
if(success){
// object saved
}
}];
0 Comment(s)