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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:03:14+00:00 2026-05-20T14:03:14+00:00

I have an application which displays modal views. In the last modal view, I

  • 0

I have an application which displays modal views. In the last modal view, I have a form. Upon clicking the done button, a web service is called which passes the values input from the user. After a response is received, the modal view is dismissed. I would like do display an alert or action sheet asking the user to wait as the web service call takes a lot of time. The problem is that the alert or action sheet gets displayed only after the view is dismissed. Why is this happening? Here is the code for the done function:

-(void)reg:(id)sender {
    if([password length] == 0) {
        //show alert
    }
    //other validation
    //This is were I write the alert
    UIActivityIndicator *activity = [[UIActivityIndicator alloc] initWithActivityIndicatorStyle: 
                                                     UIActivityIndicatorStyleWhite];
    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Processing" delegate:self otherButtonTitles:nil];
    [alert addSubview:activity];    
    [activity startAnimating];    
    [alert show];        
    WebServiceController *web = [[WebServiceController alloc]init];        
    //webservice called
    //getting the response
    //dismissing alert here    
    [self dismissModalViewControllerAnimated:YES];
}
  • 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-20T14:03:15+00:00Added an answer on May 20, 2026 at 2:03 pm

    I got it. It wasn’t a problem with modal views. The alert gets blocked because the main thread is executing the web service. The web service execution needs to be run in the background. Here’s the link to a similar question with the answer.

    Showing alert while calling webservice

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

Sidebar

Related Questions

Hi All, I have a web-view in my application which displays some text with
We have a Web application (ASP.NET) which displays in some page links to miscellaneous
I have to implement a application which displays a grid view of thubmnails each
I have a View in my MVC3 application which displays one of two pretty
I have an application which displays properties dialogs for various GUI-accessible objects. Because there
I have an XBAP WPF application which displays various pages inside of a Frame.
I have a silverlight application which reads data from a db and displays them
Here is my scenario: I have 3 views on an application, 2 of which
I have created a web application in mvc3 and created two partial views one
I am currently developing an ASP.net c# application. I have a grid view which

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.