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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:33:50+00:00 2026-05-26T22:33:50+00:00

I have looked but haven’t found a reasonable answer. I have a first TableViewController

  • 0

I have looked but haven’t found a reasonable answer. I have a first TableViewController that holds, lets say 4 rows, and when the user taps in one row (navigation hierarchy), i want to pass to the second tableViewController a string or an int that will determine which data the second tableViewController should show/load on its second table. How would I do that?

I am using Xcode 4.2, using ARC but NOT using storyboard.

Update:

ok, lets see if i got it.
in my secondVC, i will do

--
.h --
@property(nonatomic, strong) NSString *strReceived; --
.m --
@syntesize strReceived; --

in my first view controller i will do:

--
.h --
@property (nonatomic, strong) SecondViewController *secondViewController --
.m --
@syntesize secondViewController --

and then, in the method didSelectRowAtIndexPath i will do:

--
if(indexPath.row == 1) --
self.secondViewController.strReceived = @"one"; --
else --
self.secondViewController.strReceived = @"other";

is that right? since the user may go back and choose another row, does my string need to be a NSMutableString?

  • 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-26T22:33:50+00:00Added an answer on May 26, 2026 at 10:33 pm

    Add a property to your second TableViewController’s .h file and the accompanying code (e.g. @synthesise) to your .m file. When you alloc/init your second TableViewController (from the first), set the property before pushing the controller onto the navigation stack.

    You can find an intro to properties in Objective-C here.

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

Sidebar

Related Questions

I have looked through GDB documentation, but haven't found anything that works or shows
I have looked on here and anddev for a suitable response, but haven't found
I've looked around but haven't found an answer so I wanted to confirm this
I have looked on FaceBook Developer page and found that it's possible to create
I've looked everywhere for an answer on this, but haven't had any luck. I've
I have looked at similar questions on Stack Overflow but haven't been able to
I've looked at various Q&As on SO similar to this question but haven't found
I’ve looked in the forums (both here and on CodeIgniter.com) but haven’t found any
I have looked around the internet but haven't been able to find a working
I have a common problem, and have looked at several solutions but haven't seen

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.