title: How to reduce the font size and to truncate textlabel in ios tableview
body: <p>i ve got a table view.i want to reduce the font size and truncate the length of the string to 5 characters in <code>cell.detailTextLabel.text</code> .cud u guys help me out..below is the code.</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath 
  {
      static NSString *CellIdentifier = @"Cell";
      //NSInteger SectionRows=[tableView1 numberOfRowsInSection:indexPath.section];
      //NSInteger Row=indexPath.row;
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
      if (cell == nil) 
      {
          cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease]; 
      }
      //cell.imageView.backgroundColor=[UIColor clearColor];
      cell.selectionStyle=UITableViewCellSelectionStyleNone;
      cell.textLabel.text=[listOfItems objectAtIndex:indexPath.row];
      cell.textLabel.backgroundColor=[UIColor clearColor];
      cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
  
      if (indexPath.row == 3) 
      {
          cell.detailTextLabel.text=@"Aktiviteter";
      }
      if (indexPath.row == 4)
      {
          cell.textLabel.textColor=[UIColor purpleColor];
          cell.detailTextLabel.text=@"Läs mer om Allegra";
      }
      if (indexPath.row == 5)
      {
          starImage.image = [UIImage imageNamed:@"add.png"];
          [cell.contentView addSubview:starImage];
      }
  
      return cell;
  }
  </code></pre>