title: setAccessoryType destroys TableViewCell
body: <p>I use a custom tablecell, labels and images are connected with tags.</p>
  
  <p>If i add </p>
  
  <blockquote>
    <p>[cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]</p>
  </blockquote>
  
  <p>it destroys my tableview. the image destroys and the background-color.</p>
  
  <p>here are the differences:</p>
  
  <p><img src="https://i.stack.imgur.com/bEeZ8.png" alt="enter image description here"> <img src="https://i.stack.imgur.com/ORyrj.png" alt="enter image description here"></p>
  
  <p>Does anyone have any idea where the problem could be?
  Thanks</p>
  
  <p>EDIT:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier = @"TableCell";
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  
      if (cell == nil) {
  
          if ([self labelCellNib]) {
              [[self labelCellNib] instantiateWithOwner:self options:nil];
          } else {
              [[NSBundle mainBundle] loadNibNamed:@"LabelCell" owner:self options:nil];
          }
  
          cell = self.labelCell;
          self.labelCell = nil;
      }
  
      static NSDateFormatter *dateFormatter = nil;
      if (dateFormatter == nil)
          dateFormatter = [[NSDateFormatter alloc] init];
  
      static NSCalendar *calendar;
      if(calendar == nil)
          calendar= [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
  
      NSString * timeStampString = [sqlTime objectAtIndex:indexPath.row];
      NSTimeInterval _interval=[timeStampString doubleValue];
      NSDate *createdAt = [NSDate dateWithTimeIntervalSince1970:_interval];
      [dateFormatter setDateStyle:NSDateFormatterLongStyle];
  
      // Datum in die Tabellen-Zelle einfügen
      UILabel *label4 = (UILabel *)[cell viewWithTag:LABEL4];
      label4.text = [NSString stringWithFormat:@"%@", [dateFormatter stringFromDate:createdAt]];
  
      // Configure the cell...
      UILabel *label1 = (UILabel *)[cell viewWithTag:LABEL1];
      label1.text = [NSString stringWithFormat:@"%@ %@", [sqlData objectAtIndex:indexPath.row], sonderzeichen];
  
      UILabel *label2 = (UILabel *)[cell viewWithTag:LABEL2];
      label2.text = [NSString stringWithFormat:@"Preis pro %@: %@ €", sonderzeichen, [sqlPreis objectAtIndex:indexPath.row]];
  
      UILabel *label3 = (UILabel *)[cell viewWithTag:LABEL3];
      UIImageView *image = (UIImageView *)[cell viewWithTag:IMAGE_TAG];
  
      if (indexPath.row==[itemsArray count]-1) {
          image.image = [UIImage imageNamed:@"default.png"];
          label3.text = @"-";
      } else if ([itemsArray count]&gt;1) {
          int data_old = [[NSString stringWithFormat:@"%@", [sqlData objectAtIndex:indexPath.row]] intValue];
          int data_new = [[NSString stringWithFormat:@"%@", [sqlData objectAtIndex:indexPath.row+1]] intValue];
          label3.text = [NSString stringWithFormat:@"%i", data_old-data_new];
  
          NSLog(@"%d -- %d", data_old, data_new);
          if (data_new&gt;data_old) {
              image.image = [UIImage imageNamed:@"pfeil_runter.png"];
          } else if (data_new&lt;data_old) {
              image.image = [UIImage imageNamed:@"pfeil_hoch.png"];
          } else {
              image.image = [UIImage imageNamed:@"minus.png"];
          }
      }
  
      [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
  
      cell.contentView.backgroundColor = indexPath.row % 2? [UIColor colorWithRed:228.0/255.0 green:244.0/255.0 blue:199.0/255.0 alpha:1]:[UIColor whiteColor];
      return cell;
  }
  </code></pre>