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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:05:38+00:00 2026-05-16T02:05:38+00:00

In my app, there is a portion that holds a static contacts directory. I

  • 0

In my app, there is a portion that holds a static contacts directory. I would like the directory to appear indexed (alphabetically) and the detail view will need to be grouped also. (I am somewhat trying to replicate the look and feel of the Contacts app.) I have it working, just no index and a detail page that is just a view with a collection of buttons.

For some reason, I cannot get the a-ha moment when dealing with the table view.

Does anyone have any examples of how I can do this? Even better, what is the absolute best book to show how to work with UITableViews (especially when grouping them) using a PLIST as a source?

Apples documentation and other searches have gotten me some good information, but feels far from comprehensive enough to fully “get it”.

  • 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-16T02:05:38+00:00Added an answer on May 16, 2026 at 2:05 am

    First of if youre using pLists as the source then they wont stay in any form of order, well not the order there in the pList anyway. A way around this is to have an array within your pList which then has your elements. To us data from a plist you might want to do something like this if you had a plist populated with NSDictionarys:

    NSDictionary* dict = [NSDictionary initwithContentsOfFile:@"ApList.plist"];
    //Get all of the elements in the dictionary
    NSArray *array = [dict allKeys};
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 2;
    }
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return [array count];
    }    
    
    - (UITableViewCell *)tableView:(UITableView *)table cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *MyIdentifier;
    
    MyIdentifier = @"Cell";
    
    UITableViewCell *cell = (UITableViewCell *)[table dequeueReusableCellWithIdentifier:MyIdentifier];
    
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MyIdentifier] autorelease];
        [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
    }
    //Create a new dict based of the indexpath of the table cell, we need the array otherwise we wouldnt be able to get the key value for the dict.
        NSDictionary* currentDict = [NSDictionary valueForKey:[array objectAtIndex:indexPath.row]];
    //Then once you;ve got the dict create a string from a String held in that dict, in this case the key for the String is LABEL.
    NSString *title = [currentDict valueForKey:@"LABEL"];
        cell.textLabel.text = title;
    
    return cell;
    }
    

    Hope this helps

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

Sidebar

Related Questions

I'm coding an app that works much like Apple's Weather.app: There's a UIPageControl at
In my app there's a static variable that's being set to null when I
I have a jQuery web app frontend that I would like to make GET/POST
In Your Second iOS app, there is a portion that says the following: After
In my app there is requirement that..I have 6 buttons in a nib, when
In my app there is the view says googleBtn. If i press on it
I understood that in order to use cookies inside of phonegap native app there
I am working on a portion of an app that requires a Photos type
Is there a strategy or at least best practice to write an app that
I have a portion of my app that simply launches a webview linked to

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.