0

I have a class called Subcategory with a column named category that is a pointer. I am trying to call and store the pointer for a specific row. Nothing is being stored to self.categoryName.text? Thanks for looking.

Here is my code:

PFQuery *query = [PFQuery queryWithClassName:@"SubCategory"];
    [query whereKey:@"user" equalTo:[PFUser currentUser]];
    [query whereKey:@"name" equalTo:@"Food"];
    [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {

        for (PFObject *object in objects) {
            self.subcategoryName.text = object[@"name"];
            self.categoryName.text = object[@"category"];

        }
    }];

1 Answer 1

2

Use the query like this

[query whereKey:@"user" equalTo:[PFUser currentUser]];
[query includeKey:@"Food"];
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.