IOS Parse includes a key request
I am trying to print a category name using Parse in iOS and Objectve-C. Thanks for watching. Let me know if you have any questions.
CategoryInBudget Table
category (pointer) quantity (number) User (pointer)
Category table
name (string)
Here is my code:
PFQuery *query = [PFQuery queryWithClassName:@"CategoryInBudget"];
[query whereKey:@"user" equalTo:[PFUser currentUser]];
[query includeKey:@"Category"];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
for (PFObject *object in objects) {
NSLog(@"%@", object[@"Category"][@"name"];
}
}];
+3
source to share
No one has answered this question yet
Check out similar questions: