title: How to use a plist to fill a iOS TableView in XCode 4
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/10950876/how-to-populate-a-tableview-with-plist-content-using-xcode-and-4-storyboard">How to populate a TableView with plist content using XCode and 4 storyboard</a>  </p>
  </blockquote>
  
  
  
  <p>I've done these steps:</p>
  
  <p>1: Made a tableviewcontroller (WinesViewController)</p>
  
  <p>2: Added a prototype cell with title &amp; subtitle labels: namelabel &amp; districtlabel. Cell identifier: wineCell</p>
  
  <p>3: Made the Wine.plist with 10 wines (dictionaries) (Dictionary key = name of the wine)</p>
  
  <p>The dictionaries are containing 18 strings with string keys: Name, District, Image, Alcohol etc, and 1 array called Price with Price strings.</p>
  
  <p>4: Made a Wine.h/.m subclass of NSObject. The .h:</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  @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
  </code></pre>
  
  <p>And synthesized them all inn wine.m</p>
  
  <p>And then I've tried different combinations of codes from Apples Propery List Programming Guide, <a href="http://www.raywenderlich.com/5138/beginning-storyboards-in-ios-5-part-1" rel="nofollow noreferrer">http://www.raywenderlich.com/5138/beginning-storyboards-in-ios-5-part-1</a> 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.</p>
  
  <p>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?</p>
  
  <p>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!</p>