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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:13:40+00:00 2026-05-29T15:13:40+00:00

My application downloads content from a server, as soon as this has finished it

  • 0

My application downloads content from a server, as soon as this has finished it parses its content any may also display it. If it displays it then a VC is pushed onto the navigation stack.

During the course of processing the content it may be necessary to schedule a local notification.
When the notification fires a VC is also pushed onto the navigation stack to display something.

I have a problem where the local notification expires immediately – the problem is that in this situation the push of the 2nd VC is happening before the viewDidAppear: from the first VC push has executed.

I could detect if the notification is going to expire immediately and add a delay – but that seems not ideal (adding timers to solve problems is never a very good solution IMO, how much delay to add, what if its enough of a delay in most situations but not all, so make it longer to compensate, but then the pushing of the 2nd VC will be delayed possibly noticably etc. etc.).

When the notification(s) fires I could look to see if a VC has been pushed and if so if its viewDidAppear: has been called yet and if not hold off processing the notification(s) until it has.

This is doable but a small bit of messing to kept track of if/what stage the VC push is at.
Is there a more elegant solution? I’d prefer to avoid having to add yet another queue to the app.

If there’s not really any alternatives, what are options for the delaying of processing of the notifications? Could they actually be rescheduled with the OS for example so that they will execute in the next run loop (which should give the chance for viewDidAppear: to execute)?

Or is it necessary to use navigationController:didShowViewController:animated: and inspect and process a notification queue within there?

Any other options?

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-29T15:13:41+00:00Added an answer on May 29, 2026 at 3:13 pm

    you can try this

    - (void)pushVC {
        @synchronized (self) {
            HomeViewController *vc = [[[HomeViewController alloc] init] autorelease];
            [self.navController pushViewController:vc animated:YES];
        }
    }
    
    - (void)processLocalNotification:(UILocalNotification *)notification {
        [self performSelector:@selector(pushVC) withObject:nil afterDelay:2.0f]; // delay for animation
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written an AIR Application that downloads videos and documents from a server.
I have to download a xml file from server using IE browser. response.setContentType(application/octet-stream); response.setHeader(Content-Disposition,
Our application downloads data from the internet using RSS but is having connection problems
My iPhone application downloads large files from the internet (videos, for instance). I'd like
I've got an application that downloads data from a 3rd party at 3am every
I'm writing a multi threaded console application which downloads pdf files from the web
I've got this bit of code: Response.AddHeader(Content-type, application/vnd.openxmlformats-officedocument.wordprocessingml.document); Response.AppendHeader(Content-disposition, attachment; filename=Bio.docx); Response.BinaryWrite(lawyerBio.MakeDoc()); It works
I'm writing an application that downloads an XML string from a URL and POST
In my application I have a listView . I want to update its content
In my application i want to get layout file from server and set that

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.