Aaron
Aaron

Reputation: 6714

PFQueryTableViewController "loading" indicator stuck after successful query

I have a PFQueryTableViewController which is properly loading data via the queryForTable method. Even though my tableview cells are displayed with the correct data from my query, the default parse activity indicator "loading" with the spinning wheel stays on the screen and doesn't go away. I've checked the objectsDidLoad method which returns no error.

Here's a simplified example of the problem with some default cells. Three cells have been loaded for a query in my database of 3 items. However, the indicator is still there for no reason.

Parse PFQuery Loading

Can anyone explain why the loading indicator continues and how to fix it?

Upvotes: 0

Views: 270

Answers (1)

Brandon A
Brandon A

Reputation: 8289

In order for the "loading" alert to be removed after the objects are loaded for a PFQueryTableViewController the notification must reach the super class. You need to call super.objectsDidLoad() in objectsDidLoad() like so:

override func objectsDidLoad(error: NSError!) {
    super.objectsDidLoad(error)
    if error == nil {
        print("You Good")
    }
}

Good Luck!

Upvotes: 1

Related Questions