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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:22:38+00:00 2026-05-26T23:22:38+00:00

With Xcode 4.1, I used to push a Navigation Controller using the following code:

  • 0

With Xcode 4.1, I used to push a Navigation Controller using the following code:

-(IBAction)goClasse1:(id)sender{

        Classe1Chamada *goCL1 = [[Classe1Chamada alloc] initWithNibName:@"Classe1Chamada" bundle:[NSBundle mainBundle]];
    [[self navigationController] pushViewController:goCL1 animated:YES];
    [goCL1];

}

But now I updated to Xcode 4.2, this code just doesn’t work. Why? How can I fix it?

  • 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-26T23:22:38+00:00Added an answer on May 26, 2026 at 11:22 pm

    I always use it like this:

    -(IBAction)goClasse1:(id)sender{
    
            Classe1Chamada *goCL1 = [[Classe1Chamada alloc] initWithNibName:@"Classe1Chamada" bundle:[NSBundle mainBundle]];
        [self.navigationController pushViewController:goCL1 animated:YES];
        [goCL1 release];
    
    }
    

    and you don’t need to initialize or delegate navigation controller in all your view controllers: it is already initialized in ViewController class.

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

Sidebar

Related Questions

I am having troubles after updating to Xcode 4.2. Before I used the following
Using XCode 4, I used the template to generate a UIViewController subclass. However, I
XCode 3.1.2 using built-in OCTest unit testing. I'm getting a crash when unit tests
Does Xcode support anything akin to Visual Studio style #region directives for arbitrary code
Using Xcode 3.1 on OSX 10.5; is it possible to attach (the debugger) to
I recently tried to compile an older Xcode project (which used to compile just
I don't understand the concept of delegation is used in XCode. When a new
I used Unity iPhone(1.7) to build an app and brought it into Xcode (3.2.3).
In the organizer of Xcode 3.1.x I used to be able to download the
I installed Xcode 3.2.3 and the symbolicatecrash console utility that used to live here:

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.