我收到錯誤執行。有人可以告訴我我做錯了什麼嗎?長期運行的分析操作被主線程
PFQuery *query = [PFQuery queryWithClassName:@"User"];
[query getObjectInBackgroundWithId:[[PFUser currentUser] objectId] block:^(PFObject *object, NSError *error) {
self.firstName = object[@"firstname"];
self.lastName = object[@"lastname"];
self.nameLabel.text = [[NSArray arrayWithObjects:self.firstName, self.lastName, nil] componentsJoinedByString:@" "];
}];
也許這行'PFQuery * query = [PFQuery queryWithClassName:@「User」];'是一個長時間運行的作業,將阻塞主線程。 – KudoCC