How to call queryForTable to reload data from the Parse cloud in PFQueryTableViewController?

I have a table PFQueryTableViewControllerthat receives information from an analysis database. When the user selects a row, he moves to another VC. The fact that the VC user deletes some data in the analysis table. This Parse table is the same table I loaded mine into PFQueryTableViewController. Therefore, I do not need this deleted data.

When the user clicks the back button, this method is PFQueryTableViewControllercalled:

-(void) viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [self.tableView reloadData];
    [super objectsWillLoad];

}

I checked line by line. This is a data reload, but it does not cause:

- (PFQuery *)queryForTable {

    PFQuery *query = [PFQuery queryWithClassName:@"MyClass"];
    [query whereKey:@"user" equalTo:[PFUser currentUser]];
    [query orderByDescending:@"createdAt"];
    return query;
}

I deleted some data in VK and the dose did not exist in the cloud. But when I press the button, it exists. However, when I update the table, the deleted data will be deleted!

, queryForTable .

+4
1

[self loadObjects];

[self.tableView reloadData];
+1

Source: https://habr.com/ru/post/1606024/


All Articles