I suppose you use asynchronous requests. One simple solution can be a check in your RKObjectLoderDelegate's - (void)objectLoader:(RKObjectLoader*)objectLoader didLoadObjects:(NSArray*)objects method whether all of your data is already loaded.
When initiating RestKit requests, you can add a 'tag' (called userData in RestKit) to a request and retrieve that tag later in the delegate callbacks.
For example, you can implement the following logic:
When you create your requests, add a specific user data to each one:
RKObjectLoader *loader = [[RKObjectManager sharedManager] loadObjectsAtResourcePath:@"/getMyData" objectMapping:mapping delegate:self];
[loader setUserData:@"FirstRequest"];
...
RKObjectLoader *loader = [[RKObjectManager sharedManager] loadObjectsAtResourcePath:@"/getMyData" objectMapping:mapping delegate:self];
[loader setUserData:@"ThirdRequest"];
and check the tags in didLoadObjects:
- (void)objectLoader:(RKObjectLoader*)objectLoader didLoadObjects:(NSArray*)objects {
if ([[objectLoader userData] isEqual:@"FirstRequest"]) {
self.firstRequestData = objects;
}
... //handle the remaining requests
if (self.firstRequestData && self.secondRequestData && self.thirdRequestData) {
[self hideMyActivityIndicator];
}
}
Don't forget to handle error situations when loading the requests.
Alternatively, if this approach will not fit your scenario - you can add and manage requests in a separate queue & track the progress. If you'll need more info on the second option just let me know.