Datasource 三个20 UITableViewCellStyleValue1

Datasource 三个20 UITableViewCellStyleValue1,datasource,three20,cell,uitableview,Datasource,Three20,Cell,Uitableview,如何使用UITableViewCellStyleValue1单元格在数据源中创建项?我是否必须创建自己的自定义单元格才能执行此操作?我在样本目录中没有看到任何东西 谢谢,, howie使用UITableViewCellStyleValue1的关键在于您使用预定义的布局,因此不使用自定义布局 例如: // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)table

如何使用UITableViewCellStyleValue1单元格在数据源中创建项?我是否必须创建自己的自定义单元格才能执行此操作?我在样本目录中没有看到任何东西

谢谢,,
howie

使用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) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
    }

    // Configure the cell.
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;

    cell.textLabel.text = @"SettingLabel";
    cell.detailTextLabel.text = @"SettingValue";

    return cell;
}

添加了模拟表格设置单元格样式的新表格项目单元格。看

您可以手动合并它,也可以等待下一个three20版本,该版本有望包含此更改