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

  • Home
  • SEARCH
  • 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 8798833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:10:55+00:00 2026-06-14T00:10:55+00:00

I have a plist file like this <array> <array> <dict> <key>name</key> <string>Ryan</string> <key>image</key> <string>088i.png</string>

  • 0

I have a plist file like this

<array>

    <array>

        <dict>

            <key>name</key>

            <string>Ryan</string>

            <key>image</key>

            <string>088i.png</string>

            <key>webSiteURL</key>

            <string>http://www.ryan.com</string>

            <key>category</key>

            <string>Monday</string>

        </dict>

    </array>

    <array>

        <dict>


            <key>name</key>

            <string>Pinky</string>
            <key>image</key>

            <string>089i.png</string>

            <key>webSiteURL</key>

            <string>http://www.pinky.com</string>

            <key>category</key>

            <string>Sunday</string>


        </dict>

        <dict>


            <key>name</key>

            <string>Kitty</string>

            <key>image</key>

            <string>098i.png</string>

            <key>webSiteURL</key>

            <string>http://www.kitty.com</string>

            <key>category</key>

            <string>Sunday</string>


        </dict>

    </array>

</array>

This plist will be load to a NSTableView as a NSMutableArray, Now I want to pass data to DetailView, how to get specific data actually?

I use

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    if ([[segue identifier] isEqualToString:@"TableToWebSegue"]) {
        NormalDetailView *detailViewController = [segue destinationViewController];

        detailViewController.webSiteURL = [[_cellContentList objectAtIndex:indexPath.row] objectForKey:@"webSiteURL"]
    } }

But it said indexPath is wrong and should be NSIndexPath, I change it to NSIndexPath but it said .row is wrong…

This is my first app, I have no idea how to get data in this case, if I want get webSiteURL, how to do it? How to pass it to detail view?

  • 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-14T00:10:56+00:00Added an answer on June 14, 2026 at 12:10 am

    If your prepareForSegue method is in the UITableViewController that is you master controller, then just add this line to your prepareForSegue method:

     NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
    

    Then, you can use indexPath.row like you have it in your post.

    After Edit: In response to your comments, I took a look at your project, and the error is occurring on lis line in NormalViewController:

    detailViewController.name = [[_cellContentList objectAtIndex:indexPath.row] objectForKey:@"name"];
    

    The problem is, that [_cellContentList objectAtIndex:indexPath.row] is a NormalCategory object which doesn’t have an objectForKey: method. It has a normalList property, which in itself has 2 normalData objects, which in turn have a “name” property. I assume it’s that name property you’re trying to get to, but which one? Since there are 2 normalData objects, you have to have a way to pick which one you want. It seems to me that your data structure is overly complex and confusing (at least to me).

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

Sidebar

Related Questions

I have a .plist file that looks like this: <plist version=1.0> <array> <dict> <key>name</key>
I have a .plist file containing a dictionary item, something like this: <dict> <dict>
I have a favorites plist file when I try to load it like this
I have an array of string in a Plist file that located in resource
well i have an array which takes it's data from a plist file like
I have a plist file which is an array of dictionaries. Where each dictionary
So I have a plist structured string, that get dynamically (not from the file
I have a plist structured like this: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE plist PUBLIC -//Apple//DTD
I have a plist file in my resources group in xcode. I am trying
I have a TableView with 10 sections that are loaded from a plist file

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.