title: Can I pass the plist data via segue in Xcode?objective c
body: <p>I am doing something that require to display the <code>plist</code> data on the <code>Label</code> on the second controller. When I click the <code>TableView</code> on the first controller, but it seems like I can't pass it by segue. Is there any way to pass the data to the next ViewController?
  I just did this for the <code>plist</code></p>
  
  <pre><code>- (void)viewDidLoad
  {
     [super viewDidLoad];
     // Do any additional setup after loading the view, typically from a nib.
      _theTableView.dataSource=self;
      _theTableView.delegate=self;
      NSString* path = [[NSBundle mainBundle] pathForResource:@"theplist.plist" ofType:@""];
      array1 = [[NSArray alloc] initWithContentsOfFile:path];
  } 
  </code></pre>
  
  <p>and the tableview</p>
  
  <pre><code>- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
     return [array1 count];
  }
  </code></pre>
  
  <p>and the segue</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
  {
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ReusedCell"];}
  
      NSDictionary*item = array1[indexPath.row];
      cell.textLabel.text = [item objectForKey:@"movien"];
      return cell;
  }
  - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender     
  {
      if ([[segue identifier] isEqualToString:@"showDetail"])
     {
         NSIndexPath *indexPath = [_myTableView indexPathForSelectedRow];
         NSString *object = tableObjects[indexPath.row];
         DetailViewController *controller = (DetailViewController *)[segue destinationViewController];
  
        [controller setDetailItem:object];
      }
  }
  </code></pre>