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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:14:30+00:00 2026-05-27T09:14:30+00:00

I may go mad very soon. This is the reason: – I started up

  • 0

I may go mad very soon.

This is the reason:
– I started up with Single View Application project with storyboards. Then I set the view controller class name in the storyboard for my viewController.
– Next step I created one pointer for this viewController in AppDelegate method …didFinishLaunchingWithOpt… and filled it up by calling [myStoryboards instantiate…]. It works pretty good because I can call method like [vc1 setMyName] which does smthng like self.myName = @”Johnny”;
– But here it comes. When I create IBAction method joined with button, this method doesn’t know anything about “Johhny”. And this is because I’m in another instance. When I check the address of “self” it is another one…

WhyWhyWhy??? Please help, how can I use still the same object – the one instantiated in AppDelegate by storyboards and the one from storyboards in “interface builder”.

Thank you.


Oh my. I think I really underestamated it…
When we were talking about getting pointer of other viewControllers from storyboard…

I have initialViewController got by calling rootViewContr… And another one connected with segue (modal) where is UITableView. A get data on rootViewController and I want to show them on the other one in the list (UITableView). So I call segue (performSegueWithIdentifier), the other controller is shown but the list is clear. Because the method I call is working with tableView variable which is null :/ Because, again, I’m in another object. That is because I call that method storyboard instantiate… How can I get exactly the same viewController which I’m working in storyboard with. It is quite confusing for me :/

I read something about prepareForSegue and getting the pointer by destinationViewController but that is not what exactly I want. I need the pointer before I call segue method and the viewController is shown…

Thank you.

  • 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-27T09:14:31+00:00Added an answer on May 27, 2026 at 9:14 am

    If you’ve set up your initial view controller properly in the storyboard, you don’t need to assign it to the windows rootViewController property in -applicationDidFinishLaunchingWithOptions: as this is done for you automatically. It sounds like you’re creating a second instance. To access the original instance setup by the storyboard simply do this in -applicationDidFinishLaunchingWithOptions:

    InitialViewController *viewController = (InitialViewController *)self.window.rootViewController;
    viewController.myName = @"Johnny";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

may i know how to use this getMicrophone with simpleFLVWriter to create flv with
May I know what is the workaround to make this code passed, in Visual
May I just ask why this piece of code is resulting to a segmentation
May be this question is too easy or I did not know how easy
May be this is trivial, I am struggling to understand a simple documentation on
may i know which jar is this class java.lang.NoClassDefFoundError: org/springframework/metadata/Attributes located? i cannot find
May be this question has been answered before but I couldn't find it. I
May be this question a bit not for StackOverflow, but both compilers and Verilog
Alright, you may say use google search for this, there are millions of them.
may I know how to set margin in imageview dynamically?

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.