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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:32:34+00:00 2026-06-09T19:32:34+00:00

I receive a pust notification and push a view controller based on the data

  • 0

I receive a pust notification and push a view controller based on the data i get in push.
I do it like this:

   UINavigationController *navVc=(UINavigationController *) self.window.rootViewController;
   PictureTakeVC *pvc=[[PictureTakeVC alloc] init];
   [navVc pushViewController:pvc animated:NO];

It works, but the view controller that was opened before i pressed home button shows for a moment.

I also tried this but it happens the same:

PictureTakeVC *pvc=[[PictureTakeVC alloc] init];            
NSArray *vcs=[[NSArray alloc] initWithObjects: pvc, nil];
UINavigationController *navVc=(UINavigationController *) self.window.rootViewController;
navVc.viewControllers=vcs;
self.window.rootViewController = navVc;

How to push vc didReceiveRemoteNotification so that it opens immediatly and no other vc is shown for a moment?

  • 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-09T19:32:35+00:00Added an answer on June 9, 2026 at 7:32 pm

    As you said “but the view controller that was opened before i pressed home button shows for a moment.”,

    The reason is not the code, but the iOS system.
    It captures screenshot of the screen when app goes in background. As documented:

    Remove sensitive information from views before moving to the
    background
    . When an app transitions to the background, the system
    takes a snapshot of the app’s main window, which it then presents
    briefly when transitioning your app back to the foreground. Before
    returning from your applicationDidEnterBackground: method, you should
    hide or obscure passwords and other sensitive personal information
    that might be captured as part of the snapshot.

    So, if snapshot is removed then it will directly show the new pushed view controller.
    (not sure about apple guideline for snapshot)

    Update:

    One approach can be:
    Add a black colored background on the app screen when it goes in background(in applicationDidEnterBackground method). So, it will show black screen while coming back to application.{ They store it for showing launch image for already started application.}

    Where it helps?

    When we delete snapshots from ‘Preference’ directory of application sandbox(after application goes in background) and come back to application it shows black for a while as it does not have any snapshot.

    The outcome of our approach and removing snapshot are same.

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

Sidebar

Related Questions

I receive encoded PDF files regularly. The encoding works like this: the PDFs can
I receive from the client a string like this one: a, b, c, d
I receive back from a webservice a string in Json like this: conversione da
I receive from an application a message like this: The instruction at 0xA.... referenced
I receive some JSON from the net and based on that data, I must
I receive this error when I click on the section of my Tab-Bar application
I receive a dictionary as input, and would like to to return a dictionary
We receive lots of data as flat files: delimitted or just fixed length records.
I receive new data files every day. Right now, I'm building the database with
I receive a get request from server, but is encrypted with a simple algorithm

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.