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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:29:31+00:00 2026-05-14T18:29:31+00:00

I am creating an application based on the Utility template. The main screen consists

  • 0

I am creating an application based on the Utility template. The main screen consists of a menu with several buttons, each of which creates a different flip-side view. In one of those flip-side views I also configured a Navigation Controller, which works perfectly as long as I have the NavigationBar activated… I can push the view but I have to use the “back” button to return to my flip-side view, which would be the root of the Navigation Controller. The problem comes if I try to go back using “popViewControllerAnimated”, properly configured with a button, instead of the “back” button of the NavigationBar. My application crashes for some reason and I am not able to understand why.

I could just use the “back” button in the NavigationBar and forget about the problem, but I would prefer to have my own button in order to go back.

My app consists of the following:

My APPDelegate.m:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    MenuViewController *menuController = [[MenuViewController alloc] initWithNibName:@"MenuView" bundle:nil];
    self.menuViewController = menuController;
    [menuController release];

    menuViewController.view.frame = [UIScreen mainScreen].applicationFrame;
    [window addSubview:[menuViewController view]];
    [window makeKeyAndVisible];

    return YES;
}

MenuViewController.m starting my flip-side view:

- (IBAction)showFuelUpliftView {    

    FuelUpliftViewController *controller = [[FuelUpliftViewController alloc] 
                                            initWithNibName:@"FuelUpliftView" bundle:nil];
    controller.delegate = self;
    controller.title = @"Fuel Uplift";

    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:controller];
    [navController setNavigationBarHidden: NO];
    navController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
    [self presentModalViewController:navController animated:YES];

    [navController release];
    [controller release];
}

FuelUpliftViewController.m, where I push the second view of the NavigationController with a button:

- (IBAction)showFuelUplift2View:(id)sender {
    UIViewController *controller = [[UIViewController alloc] initWithNibName:@"FuelUplift2View" bundle:nil];
    controller.title = @"Settings";
    [self.navigationController pushViewController:controller animated:YES];
    [controller release];
}

And finally, my FuelUplift2ViewController.m, where the app crashes when trying to go back:

- (IBAction)backFromFuelUplift2View {
    [self.navigationController popViewControllerAnimated:YES];
}

I do not know if all this makes sense, I am currently beginning with my first application and am still learning thanks to the traditional trial an error method. Nevertheless, I cannot see the reason for this problem and would appreciate any help I can get.

Thanks very much,

Manu

  • 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-14T18:29:32+00:00Added an answer on May 14, 2026 at 6:29 pm

    I was finally able to solve my problem.

    In order to create the second view in my UINavigationController, I had this:

    - (IBAction)showFuelUplift2View:(id)sender {
        UIViewController *controller = [[UIViewController alloc] initWithNibName:@"FuelUplift2View" bundle:nil];
        controller.title = @"Settings";
        [self.navigationController pushViewController:controller animated:YES];
        [controller release];
    }
    

    I took that code from another forum and it did work straight away, so I could not imagine that I was going to have problems with it. With the above code, if I understand it correctly, I’m creating a new UIViewController for my second view, and that’s why I was able to switch to that second view and have a working “Back” button.

    Anyhow, in order to configure my own button to go back, I should have written the following:

    FuelUplift2ViewController *controller = [[FuelUplift2ViewController alloc] initWithNibName:@"FuelUplift2View" bundle:nil];
    

    Apparently I was initializing correctly a random UIViewController, but as I was not indicating properly which one it was (FuelUplift2ViewController), my method to return to the first view could not work properly.

    This was maybe a very basic question, but it took me several hours to realize the problem and I am glad I could find it by myself, juts following my code and using a little bit of common sense.

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

Sidebar

Ask A Question

Stats

  • Questions 382k
  • Answers 382k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Check Javadoc about Text class. It has two methods: toString()… May 14, 2026 at 10:30 pm
  • Editorial Team
    Editorial Team added an answer From IBM's own doco on WriteUTF: This method takes an… May 14, 2026 at 10:30 pm
  • Editorial Team
    Editorial Team added an answer You can show the active's parents using .parents() or :has()… May 14, 2026 at 10:30 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.