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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:11:41+00:00 2026-06-05T18:11:41+00:00

I know similiar questions have been asked before, but please bear with me as

  • 0

I know similiar questions have been asked before, but please bear with me as I am totally new at Objective C (have good knowledge on C).

My case is that I have a tab bar controller with two windows. When I press a button in “second” I change a variable changeName. I want to use the value of changeName in my “first” view controller but stumbled on to some problems:

To reach the other viewcontroller I found this from SO (unfortunately I forgot where):

-(NSString *)newName{

// Create a UIStoryboard object of "MainStoryBoard_iPhone" named storyboard
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:(NSString *)@"MainStoryBoard_iPhone" bundle:(NSBundle *)nil];

// Create a UIViewController object of the wanted element from MainStoryBoard_iPhone
UIViewController *secondview = [storyboard instantiateViewControllerWithIdentifier:(NSString *)@"secondBoard"];

return secondview.changeName;
}

Which I have in my first.m. MainStoryBoard_iPhone is the name of the .xib/storyboard-file.

but no. Error says

Property 'changeName' not found on object of type 'UIViewController *'

In my second.h I have

 @property (readwrite, retain) NSString *changeName;

and in second.m

 @synthesize changeName;

All help is appreciated, but please keep in mind that I have only used OOP for two days.
Thank you all in advance

EDIT: And what input should I have here?

 - (void)viewDidLoad
{
[super viewDidLoad];
mylabel.text = Name; // or [mylabel.text Name] or something? 
}
  • 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-05T18:11:43+00:00Added an answer on June 5, 2026 at 6:11 pm

    You need to cast the view controller returned to your customized second view controller (as UIViewController does not have the property changeName).

    So do the following :

    // Create a UIViewController object of the wanted element from MainStoryBoard_iPhone
    SecondViewController *secondview = (SecondViewController *)[storyboard instantiateViewControllerWithIdentifier:(NSString *)@"secondBoard"]; 
    

    I assume SecondViewController is the name of your second controller.

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

Sidebar

Related Questions

I know that similar questions have been asked before, but I am very much
I know similar questions have been asked before but I haven't seen one where
I know similar questions (regarding cherry-picking) have been asked before, but I haven't really
I know similar questions have been asked before, but still things are not clear
I know similar questions have been asked before, but I think my solution is
I know similar questions have been asked before, but I can't find one that
I know similar questions have been asked and answered before but the truth is
I know similar questions have been asked before but i think this is slightly
I know similiar questions have been asked, but I've still been unable to resolve
I know that similar questions have already been asked here before, but they all

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.