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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:40:30+00:00 2026-05-24T01:40:30+00:00

How can I retain the indexPath value from my RootViewController through my multiple detail

  • 0

How can I retain the indexPath value from my RootViewController through my multiple detail view controllers?

I have a split view controller and multiple detail views with a toolbar.

I want to be able to change the detailview upon calling a method which retrieves the indexPath.row value and uses indexPath.row+1.

So basically, I want each view controller to have a selectedRow = indexPath assignment. Currently I am getting an indexPath not declared for use error.

  • 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-24T01:40:31+00:00Added an answer on May 24, 2026 at 1:40 am

    There are lots of ways to manage this.

    Every time the selection changes, each of the detail view controllers can write their selection state to some common location.
    Whenever on gets a viewWillAppear: it sets its selection.

    or

    If you’re using a segmented view controller, in the action it is invoking, it can take the selection from the current detail view controller, change the controllers, and set the selection in the new controller.

    or … ad infinitum


    Familiarize yourself with the documentation of UITableViewController – indexPathForSelectedRow is how you’ll grab the selected index, and selectRowAtIndexPath:animated:scrollPosition: is how you set it on a table. Be warned that sending an invalid indexPath will cause an exception. If the tables are not the same size this could be a problem. wrap with a @try or check before calling

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

Sidebar

Related Questions

I have a problem where I can successfully push a new view controller from
I have two View Controllers: TableViewController (which is used as a modal view controller)
I have two views with navigation controller: first view, there are empty text fields
Can't the server just upgrade the temporary credentials to token credentials and retain the
Can you cast a List<int> to List<string> somehow? I know I could loop through
I am trying to populate a UITableView with data from json result. I can
I want to enable an UIAlertView-Request before the user can delete an item from
Have created an attribute property in TableView1.h and pushing that attributes value to another
I'm using Emacs and Mono on Windows so that I can retain the same
I am having problems sending along 2 NSString variables to a view controller right

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.