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 7669441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:35:47+00:00 2026-05-31T15:35:47+00:00

I have two views, first one A, has a button that trigger a web

  • 0

I have two views, first one “A”, has a button that trigger a web service to validate one code, if validation is successful, it performs a segue to the view “B”.

In view B, I have this

- (bool) viewDidUpload

   dispatch_async(kBgQueue, ^{


    [self processContacts];
    [self sendPost];
});



-(void) processContacts

    //Process contact address

-(void) sendPost
    //Process web services call
    //If web service call is OK, call [self updateBar]
            [self performSelectorOnMainThread:@selector(updateBar) 
                               withObject:nil waitUntilDone:YES];

UPDATED: I implemented GDC to send sendPost and processContacts in the background, then sendPost method has the updateBar call performed using performSelectorOnMainThread:, the problem is that the execution doesn’t enter in this method and it finishes without updating the bar. sendPost and processContacts now run in the background, but I don’t know how to perform updateBar in the main every time a valid connection is done, and then return to the background and perform rest of connections and again.

Many thanks

  • 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-31T15:35:48+00:00Added an answer on May 31, 2026 at 3:35 pm

    You should perform all calculations and communications in background thread. Then do updates on GUI stuff (like progress bar) in your main thread.

    Take a look at GCD. It is really easy to use and will solve your problem I’m sure.

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

Sidebar

Related Questions

I have two views that I would like to combine into one. The first
I have a view that has two buttons(First and Second) and one hidden field.
I have a Delphi 7 application that has two views of a document (e.g.
I have two views (ads) and when one ad network has no ad to
I have two view controllers that allow changes to the Address Book. The first
I have a view that is joining two tables and ordering by the first
I have two views, one view takes the whole screen, the second view covers
I have two views within one .xib (one view for landscape, another for portrait).
I have two tabbar items(views) that use the same data, whats the best solution
I have created two projects. The first one, extracts information of handset and shows

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.