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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:57:47+00:00 2026-05-25T12:57:47+00:00

I have a view whose controller is being instantiated (NSLog says so), but the

  • 0

I have a view whose controller is being instantiated (NSLog says so), but the view doesn’t show up. If I load it as a modal view it appears, but not if I allocate it.

I have this structure (MenuView is the view that doesn’t appear):

// ViewController.h

#import "MenuViewController.h"
@class MenuViewController;
@interface ViewController : UIViewController<ASIHTTPRequestDelegate>{
    ...
    IBOutlet MenuViewController         *menuView;
}
...
@property(nonatomic, retain) MenuViewController *menuView;
@end

// ViewController.m

#import "MenuViewController.h"

@implementation ViewController

@synthesize menuView;

- (void)loadMenu{
  // THIS WORKS
  // [self presentModalViewController:menuView animated:YES];

  // THIS DOESN'T (VIEWCONTROLLER IS INSTANTIATED BUT VIEW DOESN'T APPEAR

  menuView = [[[MenuViewController alloc] initWithNibName:@"MenuView" bundle:Nil] autorelease];
  [self.navigationController pushViewController:menuView animated:YES];
}
  • 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-25T12:57:48+00:00Added an answer on May 25, 2026 at 12:57 pm

    Some ideas:

    Try using self.menuView when assigning:

    self.menuView = [[MenuViewController alloc] initWithNibName:@"MenuView" bundle:Nil];

    Also, probably shouldn’t autorelease a property. Release it in dealloc and set it to nil in viewDidUnload.


    Make sure that self (ViewController) has a navigationController. Was ViewController pushed/presented by a navigationController?


    Is - (void)loadMenu{ being called from the MainThread? Check with [NSThread mainThread]


    Check out some tutorials/examples:

    Adding a Navigation Controller by Hand

    NavigationController Application in iPhone

    Tutorial: Introducing UINavigationController Part 1

    iPhone View Switching Tutorial


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

Sidebar

Related Questions

I have a modal view controller whose view comes from a XIB. I want
I have an integer variable ( time ) in one view controller whose value
I have presented the viewController which contains a navigation controller whose view is loaded
I have an app delegate, whose default view should be preceeded by a modal
I have a view controller whose viewDidLoad method invokes becomeFirstResponder on a textfield (email)
I have a view controller whose view consists of a paged scroll view controlled
I have a ListView whose size is fixed to maximum of 10 items View
i have view like 'home/details/5', it can be access by anonymous user. but there
I have view controller, into the view i have put a table view, and
I have a UIViewController whose view has a custom subview. This custom subview needs

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.