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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:02:05+00:00 2026-05-25T12:02:05+00:00

I’m coding an iphone app which takes user inputs from First View ( RootViewController

  • 0

I’m coding an iphone app which takes user inputs from First View (RootViewController) and then it needs to pass on the inputs to the “results” View Controller which is another view which uses the inputs to query a server, parse JSON string and displays results in the UITableView. I’m stuck at how to “send” these string (from user inputs on RootViewController) to the 2nd ViewController…Any idea?

Thx in advance

Stephane

  • 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-25T12:02:05+00:00Added an answer on May 25, 2026 at 12:02 pm

    There are three ways to do this, depending on how the views are set up.

    First, you can use NSNotificationCenter to post a notification of the string. The other view would register as an observer for the notification and can gather the information when it is posted.

    Secondly, if the second view controller is presented by the first, i.e. you alloc/init the VC and present it with a navigation controller, you can create a property in the second VC and set it from your root. In the header of the second VC, you would create the following:

    NSString *someString;
    

    and

    @property (nonatomic, retain) NSString *someString;
    

    then @synthesize someString; in the implementation file. Doing this lets you set the value before the view is presented.

    Lastly, if the views are not related, as in the second VC is not presented by the root, you would create an IBOutlet from the root to the second VC. Assuming you have the attribute set up like in the last solution, you would call something along the lines of self.secondVC.someString = myStringToPass;

    Hopefully one of those helps

    Edit: Realized I had commented out the link to NSNotificationCenter….oops

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

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I have a text area in my form which accepts all possible characters from
I have text I am displaying in SIlverlight that is coming from a CMS
I am currently running into a problem where an element is coming back from
For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from

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.