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

  • Home
  • SEARCH
  • 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 8479117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:56:08+00:00 2026-06-10T18:56:08+00:00

In the didFinishLaunchingWithOptions of my application , the code is _homeViewController = [[HomeViewController alloc]init];

  • 0

In the didFinishLaunchingWithOptions of my application , the code is

   _homeViewController = [[HomeViewController alloc]init];
    UINavigationController*  _navigationController = [[UINavigationController alloc] initWithRootViewController:_homeViewController];
    [self.window setRootViewController:_navigationController];
    [_navigationController setNavigationBarHidden:YES];
    [self.window makeKeyAndVisible];

and in the HomeViewController , I am having two buttons, If the button is pressed , I am presenting the ViewController. If button1 is pressed , the code is

if (_detailsViewController == nil)
            _detailsViewController = [[DetailsViewController alloc]init];

       [self.navigationController presentModalViewController:_detailsViewController animated:YES];

Now when I am in the detailsViewController and I pressing the iPhone Home button, in the same class I am using the UIApplicationDidEnterBackgroundNotification and calling a method to execute the following line

[self.navigationController popToRootViewControllerAnimated:YES];

So I thought when I open the application again, I can see the HomeViewController, but it doesn’t work. Please help me !!

  • 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-10T18:56:10+00:00Added an answer on June 10, 2026 at 6:56 pm

    It seems the reason why I am not able to pop to the root view is , I am presenting the ViewController in between, If the ViewController comes along with the navigation controller, i.e , if the ViewController is pushed as a navigation controller then i can pop to the root view controller

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

Sidebar

Related Questions

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
Supposed you've got: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen
I have the following code in my application:DidFinishLaunchingWithOptions: where I attempt to set tab
I have the following code in my appDelegate: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions (NSDictionary *)launchOptions
I have an if statement in the App Delegate's application DidFinishLaunchingWithOptions . The code
I use this code - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for
I have the following code in application didFinishLaunchingWithOptions where I want to present a
I use this code. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for
My split view controller code: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { LeftViewController *hvc =

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.