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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:52:59+00:00 2026-05-29T08:52:59+00:00

In my IB I created a segue to push from one UIViewController (identifier =

  • 0

In my IB I created a segue to push from one UIViewController (identifier = List) to another (identifier = Details). Then in

prepareForSegue

I do this to carry over some data for testing purposes:

Detail *detailsViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Details"];

NSLog(@"Current \"Details\" class in use: %@",detailsViewController);

NSLog(@"Prep Complete, Testing begins==============");
detailsViewController.TitleField.text = @"Random Text";
detailsViewController.DuedateField.text = [NSString stringWithFormat:@"%@",[NSDate date]];
detailsViewController.ReminderFieldOne.text = [NSString stringWithFormat:@"%@",[NSDate date]];
detailsViewController.ReminderFieldTwo.text = [NSString stringWithFormat:@"%@",[NSDate date]];
detailsViewController.NotesArea.text = @"Note 1: This doesnt seem to work.";

NSLog(@"Items from %@:",detailsViewController);
NSLog(@"Title Field = %@",detailsViewController.TitleField.text);
NSLog(@"Duedate field = %@",detailsViewController.DuedateField.text);
NSLog(@"Reminder field 1 = %@",detailsViewController.ReminderFieldOne.text);
NSLog(@"Reminder field 2 = %@",detailsViewController.ReminderFieldTwo.text);
NSLog(@"Notes = %@",detailsViewController.NotesArea.text);

NSLog(@"===============Testing Complete");

Yet almost all the NSLogs return (null) values from the same detailsViewController the data was sent to.

2012-02-08 13:38:53.016 TodoApp[10132:fb03] Items from <Detail: 0x6d70120>:
2012-02-08 13:38:53.017 TodoApp[10132:fb03] Title Field = (null)
2012-02-08 13:38:53.017 TodoApp[10132:fb03] Duedate field = (null)
2012-02-08 13:38:53.018 TodoApp[10132:fb03] Reminder field 1 = (null)
2012-02-08 13:38:53.019 TodoApp[10132:fb03] Reminder field 2 = (null)
2012-02-08 13:38:53.020 TodoApp[10132:fb03] Notes = (null)

I’ve been at it for a while now, to figure out why it’s (null). Does anyone have any clue why this happens? Am I missing something?

Thanks for your time!

EDIT: The Detail View thats edited and the one thats loaded seem defferent, but that does not explain why the logs return (null) coz the fetch data from the same Details view as the one thats edited.

2012-02-08 14:41:11.937 TodoApp[10567:fb03] Current "Details" class in use: <Detail: 0x6a883a0>
2012-02-08 14:41:11.937 TodoApp[10567:fb03] Prep Complete, Testing begins==============
2012-02-08 14:41:11.939 TodoApp[10567:fb03] Items from <Detail: 0x6a883a0>:
2012-02-08 14:41:11.940 TodoApp[10567:fb03] Title Field = (null)
2012-02-08 14:41:11.940 TodoApp[10567:fb03] Duedate field = (null)
2012-02-08 14:41:11.941 TodoApp[10567:fb03] Reminder field 1 = (null)
2012-02-08 14:41:11.942 TodoApp[10567:fb03] Reminder field 2 = (null)
2012-02-08 14:41:11.942 TodoApp[10567:fb03] Notes = (null)
2012-02-08 14:41:11.943 TodoApp[10567:fb03] ===============Testing Complete
2012-02-08 14:41:11.953 TodoApp[10567:fb03] View Loaded: <Detail: 0x6d1feb0>

Is there a way I can tell my app to load the instead?

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

    Because the outlets are not getting initialized before -viewDidLoad method gets called. Create iVars for each value you want to store and assign them after the init method of destination controller. Then assign those values to outlets in viewDidLoad.

    e.g.

    in your destination controller’s .h file

    @property (nonatomic, copy) NSString *noteText;
    

    Then

    Detail *detailsViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Details"];
    detailsViewController.noteText = @"Note 1: This doesnt seem to work.";
    

    And in detailsViewController -viewDidLoad method

    - (void)viewDidLoad {
      [super viewDidLoad];
      self.NotesArea.text = noteText;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIViewController (firstViewController) which has a button that 'segue's to another UIViewController
Created .NET WCF service, tested it - works. Generated schemas from Data and service
I created a Rails application normally. Then created the scaffold for an event class.
I created a list of lists: >>> xs = [[1] * 4] * 3
I'm trying to switch back from my UIViewController to my UITableViewController but apperendly it's
I created a new MVC3 project, hit F5, saw the sample page. Then I
I created the register form in asp.net. And I want to validate Name. This
I'm looking for the UIButtonTypeInfoLight choice in the identifier list for button bar items,
I created a program using dev-cpp and wxwidgets which solves a puzzle. The user
I created a few mediawiki custom tags, using the guide found here http://www.mediawiki.org/wiki/Manual:Tag_extensions I

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.