title: iOS load data from a .plist file
body: <p>I am new to iOS development. Currently, I am trying to get data from a .plist file and showing on <strong>UITableView</strong>. While running the application, Xcode didn't provide any error, But my application shows nothing but this</p>
  
  <p><img src="https://i.stack.imgur.com/IrMK7.png" alt="enter image description here"></p>
  
  <p>Here is my code </p>
  
  <p><strong>TestAppTableViewController.h</strong></p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface TestAppTableViewController : UITableViewController
  
  @property (nonatomic,strong) NSArray *content;
  
  @end 
  </code></pre>
  
  <p><strong>TestAppTableViewController.m</strong></p>
  
  <pre><code>#import "TestAppTableViewController.h"
  
  @interface TestAppTableViewController ()
  
  @end
  
  @implementation TestAppTableViewController
  
  @synthesize content = _content;
  
  - (NSArray *) content{
      if (!_content) {
          _content = [[NSArray alloc]initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Data" ofType:@"plist"]];
      }
  
      return _content;
  }
  
  - (id)initWithStyle:(UITableViewStyle)style
  {
      self = [super initWithStyle:style];
      if (self) {
          // Custom initialization
      }
      return self;
  }
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      // Uncomment the following line to preserve selection between presentations.
      // self.clearsSelectionOnViewWillAppear = NO;
  
      // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
      // self.navigationItem.rightBarButtonItem = self.editButtonItem;
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  #pragma mark - Table view data source
  
  - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
  
      // Return the number of sections.
      return 0;
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      // Return the number of rows in the section.
      return [self.content count];
  }
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier = @"Cell";
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
  
      // Configure the cell...
  
      cell.textLabel.text = [[self.content objectAtIndex:indexPath.row]valueForKey:@"city"];
      cell.detailTextLabel.text = [[self.content objectAtIndex:indexPath.row]valueForKey:@"state"];
      return cell;
  }
  </code></pre>
  
  <p><strong>Data.plist</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
  &lt;plist version="1.0"&gt;
  &lt;array&gt;
      &lt;dict&gt;
          &lt;key&gt;city&lt;/key&gt;
          &lt;string&gt;New York&lt;/string&gt;
          &lt;key&gt;state&lt;/key&gt;
          &lt;string&gt;NY&lt;/string&gt;
          &lt;key&gt;cityText&lt;/key&gt;
          &lt;string&gt;This is the description of the city that goes in the tex view just testing.&lt;/string&gt;
      &lt;/dict&gt;
      &lt;dict&gt;
          &lt;key&gt;city&lt;/key&gt;
          &lt;string&gt;Los Angeles&lt;/string&gt;
          &lt;key&gt;state&lt;/key&gt;
          &lt;string&gt;CA&lt;/string&gt;
          &lt;key&gt;cityText&lt;/key&gt;
          &lt;string&gt;This the second item&amp;apos;s textview&lt;/string&gt;
      &lt;/dict&gt;
      &lt;dict&gt;
          &lt;key&gt;city&lt;/key&gt;
          &lt;string&gt;Chicago&lt;/string&gt;
          &lt;key&gt;state&lt;/key&gt;
          &lt;string&gt;IL&lt;/string&gt;
          &lt;key&gt;cityText&lt;/key&gt;
          &lt;string&gt;here is the text view description for the third item.&lt;/string&gt;
      &lt;/dict&gt;
      &lt;dict&gt;
          &lt;key&gt;city&lt;/key&gt;
          &lt;string&gt;Sandiago&lt;/string&gt;
          &lt;key&gt;state&lt;/key&gt;
          &lt;string&gt;CA&lt;/string&gt;
          &lt;key&gt;cityText&lt;/key&gt;
          &lt;string&gt;Here is another city from california&lt;/string&gt;
      &lt;/dict&gt;
      &lt;dict&gt;
          &lt;key&gt;city&lt;/key&gt;
          &lt;string&gt;Talahasy&lt;/string&gt;
          &lt;key&gt;state&lt;/key&gt;
          &lt;string&gt;FL&lt;/string&gt;
          &lt;key&gt;cityText&lt;/key&gt;
          &lt;string&gt;Talahasy is the capital of the florida state.&lt;/string&gt;
      &lt;/dict&gt;
      &lt;dict&gt;
          &lt;key&gt;city&lt;/key&gt;
          &lt;string&gt;Boise&lt;/string&gt;
          &lt;key&gt;state&lt;/key&gt;
          &lt;string&gt;Idaho&lt;/string&gt;
          &lt;key&gt;cityText&lt;/key&gt;
          &lt;string&gt;boise is the capital of idaho and i have no idea where that is.&lt;/string&gt;
      &lt;/dict&gt;
  &lt;/array&gt;
  &lt;/plist&gt;
  </code></pre>
  
  <p>I didn't able to figure out the problem. So, my question is what is the problem in my code ? How can I show the data from plist file ? I browsed the previous question's in stackoverflow but that didn't helped me.</p>