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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:58:49+00:00 2026-05-27T17:58:49+00:00

What I want to happen, in order: Alert box pops up saying processing (no

  • 0

What I want to happen, in order: Alert box pops up saying processing (no buttons), the main processing function is called, when that completes the Alert box disappears, and then my navigation controller moves to the next view in the series.

What actually happens: The window freezes while the app processes, then the Alert box shows and disappears instantly while the navigation controller changes to the next view.

Best suggestion on how to fix this?

Code:
[_navigationController dismissModalViewControllerAnimated:NO]; //Camera dismisses
UIAlertView *alert;

alert = [[[UIAlertView alloc] initWithTitle:@"Analyzing\nPlease Wait..." message:nil delegate:nil cancelButtonTitle:nil otherButtonTitles: nil] autorelease];
[alert show];

[self processImage];

[alert dismissWithClickedButtonIndex:0 animated:YES];
[self gotoResults];
  • 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-27T17:58:50+00:00Added an answer on May 27, 2026 at 5:58 pm
    alert = [[[UIAlertView alloc] initWithTitle:@"Analyzing\nPlease Wait..." message:nil delegate:nil cancelButtonTitle:nil otherButtonTitles: nil] autorelease];
    [alert show];
    

    When calling [alert show], the UI event is pushed into main run loop. You can process other tasks in another function. For example, a function named foo processes other tasks. And after calling [alert show], we call [self performSelector:@selector(foo) withObject:nil afterDelay:0.1] to invoke foo. That will give run loop some time to handle the showing event of alert view.

    - (void)foo {
      UIAlert *alert = ... ///< come from above 
      [self processImage];
    
      [alert dismissWithClickedButtonIndex:0 animated:YES];
      [self gotoResults];
    }
    

    Edit:
    You can read about -performSelector:withObject:afterDelay: in this apple official document. You can assign 0.0 as parameter for afterDelay, and the document said:

    delay


    The minimum time before which the message is sent. Specifying a
    delay of 0 does not necessarily cause the selector to be performed
    immediately. The selector is still queued on the thread’s run loop and
    performed as soon as possible.

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

Sidebar

Related Questions

Here is what I want to happen: The user should click a link/button that
I want to know that what will happen to my activity incase of an
I happen to have an ASP.NET 2.0 project that I want to apply a
I have a number of events that happen in a game. I want to
Ohey, I have a central function that runs AJAX requests throughout my order form.
I copied this example from api.jquery.com $('.target').change(function() { alert('Handler for .change() called.'); }); I
I have an keyup handler. I want something to happen every time I press
I want to schedule events to happen for my users. Is there an efficient
so I want to do something like this: , :order => (products.name = 'Some
I have a command that I want to restrict only to certain ranks. I'm

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.