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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:11:45+00:00 2026-06-13T20:11:45+00:00

I have an iPad master-detail where the main detail controller is a navigation controller

  • 0

I have an iPad master-detail where the main detail controller is a navigation controller and depending on the table row (in the master view controller) selected, I may or may not replace the view controller managed by the detail navigation controller.

This seems to work fine, except that I lose access to the new detail view controller’s IBOutlets when this move is made.

Here’s me switching the navigation controller’s view controller:

CustomerDetailViewController *subview = [[CustomerDetailViewController alloc] initWithNibName:@"CustomerDetailViewController" bundle:nil];            
[subview setTitle:@"Testing"];
AppDelegate *app = (AppDelegate *)[[UIApplication sharedApplication] delegate];
app.splitViewController.delegate = subview;
[app.detailNavigationController setViewControllers:[NSArray arrayWithObjects:subview, nil]];
[subview setData:[custData objectForKey:@"name"]];

custData is an NSDictionary containing my view information. Here is the setData command:

- (void)setData:(NSDictionary *)cust {

    NSLog(@"%@\n", [cust valueForKey:@"name"]);
    self.nameLabel.text = [cust valueForKey:@"name"];
    NSLog(@"%@\n", self.nameLabel.text);
}

So what happens is, subview becomes the new view controller but the label does not get changed – however, those two log commands are executed. The label is synthesized and wired up using IB and works if I push subview as a new view controller instead of replace 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-06-13T20:11:46+00:00Added an answer on June 13, 2026 at 8:11 pm

    I’d say, the view is not yet initialized. Outlets are first connected in the viewDidLoad method. Try putting a log statement in the viewDidLoad to find out, which one gets called first.

    If the viewDidLoad is called after your setData method, you can only set a local variable of the CustomerDetailViewController which is then read by viewDidLoad which sets the label accordingly.

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

Sidebar

Related Questions

I have created split view based ipad app, where master view is table view
In my iPad application, i have used UISplitViewController where master view contains table view
I have a navigation controller in the master pane of a split view controller.
I have to create a list of list using split view controller in IPad,
I am working on an iPad app with a split view controller. I have
I have a simple iOS Master-Detail Application -> On the iPad it's a splitview,
I have some details stored inside an NSDictionary. I'm using a Master-Detail view on
I have an iPad SplitViewController application with the following features: master (left hand) view
I have a Master-Detail application for iPad. I am using storyboard. When the user
I have a master-detail app that is working great for the iPad. However, the

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.