I'm using a table view to display a list. Only one cell will have UITableViewCellStyleValue1
. The problem is that when scrolling up/down, the detailed text is not displaying well. here's the code.
// Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { if(indexPath.row == 0) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease]; cell.textLabel.textColor = [UIColor whiteColor]; cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton; cell.detailTextLabel.textColor = [UIColor yellowColor]; cell.detailTextLabel.text = @"Description"; } else { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; cell.textLabel.textColor = [UIColor whiteColor]; cell.accessoryType = UITableViewCellAccessoryNone; } } // Configure the cell. cell.textLabel.text = [radioList objectAtIndex:indexPath.row]; return cell; }
Can some one help me?