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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:32:14+00:00 2026-05-19T15:32:14+00:00

I feel really bad for asking this because someone helped me get half of

  • 0

I feel really bad for asking this because someone helped me get half of it but im literally at witts end tryin to figure this out.

Basically i want a sectioned UITableView that loads its data from a pList file that can drill down into subviews.

As mentioned before, someone was nice enough to help me get the Sectioned UITableView from a pList but i cant figure out how to drill it down

Heres his Source that he provided to me

I’d show it here but i dont quite understand how to display code without it looking disgusting =/

  • 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-19T15:32:14+00:00Added an answer on May 19, 2026 at 3:32 pm

    you could just repeat the same trick for the deeper levels. I.e., have separate plist files called “Section1Row1.plist”, “Section2Row2.plist”, etc. Then you can reuse the same view controller class, but make the name of the plist file that it loads depend on the selection the user made.

    The other approach is to store everything in one big plist file. Each option (row) then becomes a dictionary, containing the title and a whole new hierarchy like the original one. The “root” array of the new view controller is then set to the option you selected, like I show in the sample code and plist below.

    Either approach will become messy though if you have many options or levels.

    - (void) viewDidLoad
    {
        [super viewDidLoad];
        if (!self.tableData)
        {
            self.tableData = [NSArray arrayWithContentsOfFile: [[NSBundle mainBundle] pathForResource: @"Table" ofType: @"plist"]];
            self.title = @"Root";
        }
    }
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
    {
        static NSString *CellIdentifier = @"Cell";
    
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        if (cell == nil) {
            cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
        }
    
        cell.textLabel.text = [[[[tableData objectAtIndex: indexPath.section] objectForKey: @"Rows"] objectAtIndex: indexPath.row] objectForKey: @"Title"];
        return cell;
    }
    
    - (void) tableView: (UITableView*) tableView didSelectRowAtIndexPath: (NSIndexPath*) indexPath;
    {
        RootViewController* nextViewController = [[[RootViewController alloc] initWithNibName: @"RootViewController" bundle: nil] autorelease];
        NSDictionary* rowData = [[[tableData objectAtIndex: indexPath.section] objectForKey: @"Rows"] objectAtIndex: indexPath.row];
        NSArray* subtree = [rowData objectForKey: @"Subtree"];
        nextViewController.tableData = subtree;
        nextViewController.title = [rowData objectForKey: @"Title"];
    
        [self.navigationController pushViewController: nextViewController animated: YES];
    }
    
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <array>
        <dict>
            <key>Title</key>
            <string>Section1</string>
            <key>Rows</key>
            <array>
                <dict>
                    <key>Title</key>
                    <string>Row1</string>
                    <key>Subtree</key>
                    <array/>
                </dict>
                <dict>
                    <key>Title</key>
                    <string>Row2</string>
                    <key>Subtree</key>
                    <array>
                        <dict>
                            <key>Title</key>
                            <string>Table2Section1</string>
                            <key>Rows</key>
                            <array>
                                <dict>
                                    <key>Title</key>
                                    <string>Row1</string>
                                    <key>Subtree</key>
                                    <array/>
                                </dict>
                                <dict>
                                    <key>Title</key>
                                    <string>Row2</string>
                                    <key>Subtree</key>
                                    <array/>
                                </dict>
                            </array>
                        </dict>
                    </array>
                </dict>
            </array>
        </dict>
    </array>
    </plist>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I feel really dumb for asking this question, but here it goes. I have
I feel really silly asking this question but how do you add any data
I feel like this might be really simple but I'm just not getting it
I feel like there's a simple solution to this, but I'm not really sure
I really feel stupid for posting this but since i got no answers on
I feel bad about not getting this. But, although I have read several articles
Well! I feel really stupid for this question, and I wholly don't mind if
First let me say that I really feel directionless on this question. I am
(Really strugging to title this question, so if anyone has suggestions feel free.) Say
Feel free to close and/or redirect if this has been asked, but here's my

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.