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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:55:00+00:00 2026-06-05T07:55:00+00:00

Possible Duplicate: How to populate a TableView with plist content using XCode and 4

  • 0

Possible Duplicate:
How to populate a TableView with plist content using XCode and 4 storyboard

I’ve done these steps:

1: Made a tableviewcontroller (WinesViewController)

2: Added a prototype cell with title & subtitle labels: namelabel & districtlabel. Cell identifier: wineCell

3: Made the Wine.plist with 10 wines (dictionaries) (Dictionary key = name of the wine)

The dictionaries are containing 18 strings with string keys: Name, District, Image, Alcohol etc, and 1 array called Price with Price strings.

4: Made a Wine.h/.m subclass of NSObject. The .h:

#import <Foundation/Foundation.h>

@interface Wine : NSObject {

    NSString *wineImage;
    NSString *wineName;
    NSString *wineDistrict;
    NSString *wineCountry;
    NSString *wineFlag;
    NSString *wineFylde;
    NSString *wineFriskhet;
    NSString *wineGarvesyre;
    NSString *wineColor;
    NSString *wineSmell;
    NSString *wineTaste;
    NSString *wineSuits;
    NSString *wineGrapes;
    NSString *wineAlcohol;
    NSString *wineSugar;
    NSString *wineAcid;
    NSString *wineProducer;
    NSMutableArray *winePrice;
    NSString *wineFact;
}

@property (copy, nonatomic) NSString *wineImage;
@property (copy, nonatomic) NSString *wineName;
@property (copy, nonatomic) NSString *wineDistrict;
@property (copy, nonatomic) NSString *wineCountry;
@property (copy, nonatomic) NSString *wineFlag;
@property (copy, nonatomic) NSString *wineFylde;
@property (copy, nonatomic) NSString *wineFriskhet;
@property (copy, nonatomic) NSString *wineGarvesyre;
@property (copy, nonatomic) NSString *wineColor;
@property (copy, nonatomic) NSString *wineSmell;
@property (copy, nonatomic) NSString *wineTaste;
@property (copy, nonatomic) NSString *wineSuits;
@property (copy, nonatomic) NSString *wineGrapes;
@property (copy, nonatomic) NSString *wineAlcohol;
@property (copy, nonatomic) NSString *wineSugar;
@property (copy, nonatomic) NSString *wineAcid;
@property (copy, nonatomic) NSString *wineProducer;
@property (retain, nonatomic) NSMutableArray *winePrice;
@property (copy, nonatomic) NSString *wineFact;

@end

And synthesized them all inn wine.m

And then I’ve tried different combinations of codes from Apples Propery List Programming Guide, http://www.raywenderlich.com/5138/beginning-storyboards-in-ios-5-part-1 and answers from here, to fill the tableview cells with the Name and District strings from the plist as title/subtile. Now I’ve created a mess and confused myself, I dont even want to post the code from WinesViewController.h/.m. It’s better to just start over.

Later I will add the images too, and use the rest of the info from the plist to create the WinesDetailViewController, but making the tableView seems to be enough to begin with.. Can someone help me please?

I want the wines to show a-z in the tableview, just 1 section to begin with and i will add sections later.. First, I need to make this ground structure finished!

  • 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-05T07:55:02+00:00Added an answer on June 5, 2026 at 7:55 am

    The simplest way is to use:

    NSDictionary* wines = [NSDictionary dictionaryWithContentsOfURL:<URL to plist file>];
    

    That will create a dictionary containing everything that was in the plist. You can then step through the keys of the dictionary (which will be the names of the wines), like this:

    NSEnumerator* keyEnum = [wines keyEnumerator];
    NSDictionary* nextWine = nil;
    while ((nextWine = [keyEnum nextObject]) != nil)
    {
        // pull out the data for each wine, such as its image, district, country, etc. and
        // put them into your model object.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Where can I get a list of all countries/cities to populate a
Possible Duplicate: Populate unique values in to VBA array from excel I need to
Possible Duplicate: Difference of create Index by using include column or not using Edit:
Possible Duplicate: Where can I get a list of all countries/cities to populate a
Possible Duplicate: Get drive information (free space, etc.) for drives on Windows and populate
Possible Duplicate: Inserting new table row after the first table row using JQuery I
Possible Duplicate: Looping in a spiral I'm creating a program to populate a 3
Possible Duplicate: How to dynamically populate options on dropdown lists based on selection in
Possible Duplicate: Yield In VB.NET In C#, when writing a function that returns an
Possible Duplicate: Best way to stop SQL Injection in PHP I am creating a

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.