Я использую табличное представление для отображения списка. Только одна ячейка будет иметь UITableViewCellStyleValue1
. Проблема в том, что при прокрутке вверх / вниз подробный текст отображается плохо. вот код.
// 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;
}
Может кто-нибудь мне помочь?