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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:03:10+00:00 2026-05-28T08:03:10+00:00

I am trying to call a subview after a button is clicked on my

  • 0

I am trying to call a subview after a button is clicked on my root controller. The warnings appear in my AppDelegate (code is below), but I included the method from my root controller on how I call this new subview also in case that too has a problem.
the alerts that continue to come up are that the local declaration of navController hides an instance variable.
When I launch the application (which used to open fine) it now simply exits out…

#import "SEM2REDOAppDelegate.h"
#import "SEM2REDOViewController.h"

@implementation SEM2REDOAppDelegate

@synthesize window;
@synthesize navController;


#pragma mark -
#pragma mark Application lifecycle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    [self.window makeKeyAndVisible];

    SEM2REDOViewController  *firstController = [[SEM2REDOViewController alloc]
                                            initWithNibName:@"SEM2REDOViewController" bundle:nil];
    UINavigationController  *navController = [[UINavigationController alloc]
                                              initWithRootViewController:firstController];

    [self setNavContorller:navController];
    [window addSubview:[navController view]];

    [navController release];
    [firstController release];  

    return YES;
}

then here is the method inside of my first view controller

- (IBAction)chooseFirstMeeting:(id)sender {     
    SelectRotationController *selectView = [[SelectRotationController alloc] 
                                            initWithNibName:@"SelectView" bundle:[NSBundle mainBundle]];
    [selectView.navigationItem setTitle:@"Select First Meeting"];
    [self.navigationController pushViewController:self.selectRotationController animated:YES];
    self.selectRotationController = selectView; 
    [selectView release];
}

I know this may be an extremely simple question but I’ve just started this. doing an intensive study on programming in high school as an added course so I’d really appreciate any help!

  • 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-28T08:03:11+00:00Added an answer on May 28, 2026 at 8:03 am

    Rename navController

    UINavigationController  *navController = [[UINavigationController alloc]
                                              initWithRootViewController:firstController];
    

    into something else. You can do this automatically by control-clicking word “navController”, choosing “Refactor” from context menu, and then “Rename…”.

    Explanation:

    The problem, I believe, in your local variable navController having the same name as instance variable under synthesized declared property navController.

    Edit:
    Also, this seems to be a typo:

     [self setNavContorller:navController];
    

    Correct:

     [self setNavController:navController];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to call cleartool from an java application, but cleartool hangs even
I'm trying to call a stored procedure from my .NET code which has one
I'm trying to call the MyJavascriptFunction(arg1) from an asp button and it's doesn't work...
I'm trying to call the HttpServerUtuility.URLDecode function in C# using Visual Studio 2005, but
Trying to call the projects controller and the editproject function and pass an id
Im trying to call if div exists with the following code. Div 1 and
Hi im trying call this function from an element, but the element id is
I'm trying call qsort in Cython with a custom compare function but I don't
I'm trying to call a function after I load some XML into Actionscript, and
Im trying to call the first row from a SP list after a user

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.