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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:25:03+00:00 2026-05-16T02:25:03+00:00

I am trying to implement a modal navigation controller as described in the Apple

  • 0

I am trying to implement a modal navigation controller as described in the Apple iOs Guide: Combined View Controller Interfaces

I have come to the conclusion that I am missing something both obvious and stupid as I simply cannot get anything to display, I get a blank white screen.

Swapping things out I can prove that the view controller that I am using as the navigation controllers RootViewController works fine on it’s own (by adding it manually as a view subChild).

Further, implementing addSubView ([self.view addSubview:navController.view]) instead of presentModalViewController seems to work OK.

Can anyone point out my simple error because I am 5 minutes short of kicking my own face 😀

header

#import <UIKit/UIKit.h>

@interface BaseViewController : UIViewController {

}

implementation

#import "BaseViewController.h"
#import "ScannedListViewController.h"
#import "ScannedItemViewController.h"

@implementation BaseViewController

- (void)viewDidLoad {

    ScannedListViewController *listViewController = [[ScannedListViewController alloc] init];
    ScannedItemViewController *itemViewController = [[ScannedItemViewController alloc] init];

    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:listViewController];
    [navController pushViewController:itemViewController animated:NO];

    [self presentModalViewController:navController animated:YES];

    [listViewController release];
    [itemViewController release];
    [navController release];

    [super viewDidLoad];

}

The RootControllerView is a basic test TableViewController with the following header

@interface ScannedListViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource>

Thank you in advance if your able to 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-16T02:25:03+00:00Added an answer on May 16, 2026 at 2:25 am

    Why are you presenting something modally in a view controller’s viewDidLoad method? I find that odd off the top. Generally you show a modal view controller in response to some action (like tapping a button).

    Is there a reason you’re showing a navigation controller with a second view controller already pushed on it after the root?

    You should have [super viewDidLoad] as the first line, not the last line, of the method.

    You do not need to have <UITableViewDelegate, UITableViewDataSource> after UITableViewController because it already adopts those protocols. Remove that bit.

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

Sidebar

Related Questions

I have recently come across a problem trying to implement Model-View-Controller in Swing .
I have a Java project that I'm trying to implement with a model-view-controller design.
I am bigginer to php and i was trying to implement Model-View-Controller in php
I am trying to implement a delegate to enable a modal view to pass
Trying to implement a modal window with CCLayer. My modal view layer is added
I'm trying to present modally a UITableViewController from a view controller in my navigation
I'm trying to have a Terms of Service modal view display when my application
I'm trying to implement UI automation in a WPF application but whenever a modal
Here is my problem, Im trying to present a modal view in front of
I am trying to implement a modal window using jqModal plug-in. I make an

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.