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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:59:12+00:00 2026-06-06T23:59:12+00:00

I have a modal view controller that appears, checks a service on the Internet

  • 0

I have a modal view controller that appears, checks a service on the Internet and then dismisses itself when done. The nib contains an activity indicator and a label to inform the user what is going on.

When the update is complete, the label changes to “Update Complete” and then dismisses the view controller. However, I want it to delay the dismiss for a couple of seconds to give the user a chance to see the text before it disappears. So I’ve done this:

#pragma mark - AssetLoaderServiceDelegate

- (void)assetLoaderServiceDidFinishLoading:(AssetLoaderService *)service
{
    [self.spinner stopAnimating];
    self.infoLabel.text = @"Update complete";
    [self performSelector:@selector(dismissUpdater) withObject:nil afterDelay:2.0];
}

- (void)dismissUpdater
{
    [self dismissModalViewControllerAnimated:YES];
}

But for some reason, the selector is never being called. I’ve tried running it in mode NSRunLoopCommonModes too, but that doesn’t work either.

I must be doing something wrong, but I can’t see what…

EDIT: The delegate callback is actually happening within an NSOperationQueue, which might mean it’s not on the same thread when it sends the message back to the view controller? So I tried

[self performSelector:@selector(downloadQueueComplete) withObject:nil afterDelay:0.0 inModes:[NSArray arrayWithObject:NSRunLoopCommonModes]];

followed by

- (void)downloadQueueComplete
{
    [delegate assetLoaderServiceDidFinishLoading:self];
}

But the performSelector doesn’t seem to be working here either.

  • 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-06-06T23:59:13+00:00Added an answer on June 6, 2026 at 11:59 pm

    Following up your suggestion about the thread issue, would you try with:

    [self performSelectorOnMainThread:@selector(downloadQueueComplete) withObject:nil waitUntilDone:YES]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a modal view controller that I am presenting on iPad via: vc.modalPresentationStyle
I have a modal view controller that I am trying to present a web
I have a view controller that I would like to present in a modal
I have a Java project that I'm trying to implement with a model-view-controller design.
I have a modal view controller, and I want its navigation bar (I think
I have a Modal View Controller, and a Navigation View Controller embedded in a
I have a modal view controller and a master view controller. When I open
I am trying to present a modal view controller. I have read the documentation,
I have a UIPresentationFormSheet (contains a textview) that appears in the center of the
I have a problem with the Dropbox iPad login modal view controller: sometimes you

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.