title: Xcode tableview subtitle
body: <p>I have been searching for a while trying to get help, but without luck :(</p>
  
  <p>I want to set the subtitle in TableViewCells. The subtitles must not be the same in every cell. I have been writing some code:</p>
  
  <pre><code>- (void)viewDidLoad
  {
  [super viewDidLoad];
   tableData = [[NSArray alloc] initWithObjects:@"cell 1", @"cell 2", nil];
  
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 
  {
  return [tableData count];
  }
  
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath        *)indexPath 
  {
  UITableViewCell *cell = nil;
  cell = [tableView dequeueReusableCellWithIdentifier:@"MyCell"];
  if (cell == nil)
  { 
      cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle      reuseIdentifier:@"MyCell"];
  }
  cell.textLabel.text = [tableData objectAtIndex:indexPath.row]; 
  
  cell.detailTextLabel.text = @"Subtitle 1", @"Subtitle 2", nil;
  
  return cell;
  }
  </code></pre>
  
  <p>The problem is in <code>cell.detailTextLabel.text = @"Subtitle 1", @"Subtitle 2", nil;</code></p>
  
  <p>Does anybody know how to set a different subtitle in each cell?</p>
  
  <p>Good luck! :) </p>