Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6808897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:00:45+00:00 2026-05-26T20:00:45+00:00

I have a IBAction which is called via a button in my iPad App.

  • 0

I have a IBAction which is called via a button in my iPad App.

The IBaction Calls then three different methods which initiate a RestKit Request.

What would be the best way to check of for all three requests the objects where retrieved?

The goal is to show an activityIndicator with the first request and stop/hide the activityIndicator with the retrieval of objects for all three requests.

I’m new to RestKit, so please forgive me if this is a too simple question. I tried to find a solution by myself with the help of the RestKit API – Documentation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:00:46+00:00Added an answer on May 26, 2026 at 8:00 pm

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a view controller i have a button which internally calls an IBAction and
I have a method called -showMoreTools: which is: - (IBAction) showMoreTools:(id)sender { UIActionSheet *popupQuery
I have a utility app. I've implemented this code on the flipside, which calls
I have a one View Controller Called ThemeViewController with three nibs, all of which
In my app i have reset button which delete all the data of tables
I have a viewController called MainViewController, which has a UIButton. When tapped, this button
I have a view in my storyboard which I assigned an identifier called MainView.
I have a custom UITableViewCell , which have a button on it, IB linked
I have a straightforward NSDocument -based Mac OS X app in which I am
I have a popover view which is called with: Info *infoview = [[Info alloc]init];

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.