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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:12:43+00:00 2026-05-25T15:12:43+00:00

When starting, my app checks for an update. If it is available, I try

  • 0

When starting, my app checks for an update. If it is available, I try to put an overlay view on top of each other with this instruction:

[[[UIApplication sharedApplication] keyWindow] addSubview:overlay];

The overlay view appears but quickly disappears, while I want to remove it when the update process ends. Instead, if I add the overlay view as a subview of the current view, the overlay view stays on top until the update process finishes.

I have to put the overlay view on top of keyWindows because my app has a tab bar, so if I put the overlay view on top of the current view, the overlay view will disappear if the user tap on another item in the tab bar.

May be due to the fact I moved the check for an update in a separate task with NSInvocation? Here is my relevant code:

[in viewDidLoad]

    NSOperationQueue *queue = [NSOperationQueue new];

    NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(checkForUpdate) object:nil];

    [queue addOperation:operation];
    [operation release];

[in checkForUpdate]

    if (![localVersion isEqualToString:remoteVersion])
    {
        [self performSelectorOnMainThread:@selector(doUpdate) withObject:nil waitUntilDone:NO];
    }

[in doUpdate]

UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:@"Update" message:@"Download the latest version of...?" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];

[alertView show];
[alertView release];

[in willDismissWithButtonIndex]

if (buttonIndex == 1)
{
    CGRect overlayFrame = [[UIApplication sharedApplication] keyWindow].bounds;
    overlay = [[UIView alloc] initWithFrame:overlayFrame];
    overlay.backgroundColor = [UIColor blackColor];
    overlay.alpha = 0.7;

    // Do other staff...

    [[[UIApplication sharedApplication] keyWindow] addSubview:overlay];

    NSURL *url = [NSURL URLWithString:@"http:www.testserver.com/test/UpdatePack.zip"];
    NSURLRequest *theRequest = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:300.0];

    connection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
    connection = nil;
}

[in connectionDidFinishLoading]

[overlay removeFromSuperview];
  • 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-25T15:12:43+00:00Added an answer on May 25, 2026 at 3:12 pm

    I solved the problem adding the overlay to the tabbarViewController’s view:

    [self.tabBarController.view addSubview:overlay];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm starting Android Market via my app to search for similar products using this
Possible Duplicate: Starting iPhone app development in Linux? Is there a way to use
I am new to Blackberry programming and starting my first app soon. I believe
My team is starting a new LOB WinForms app and I'm evaluating architectural solutions.
I'm looking at starting a new web app which needs to be secure (if
I got an app running on my SQL Server that is starting to slow
I have an MVC2 app where I am starting to use the STE 's.
I'm starting on work on my first Windows Mobile 6.5 app in C#, and
Just starting with js, decided to convert Friendfeed to a fluid app, and as
I'm soon going to be starting some iPhone Development (3.0) building a simple app

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.