how to set the style of the TableView to "UITableViewCellStyleSubtitle"
how to set the style of the TableView to "UITableViewCellStyleSubtitle". 开发者_JAVA技巧 so that i can use it to display as sub title in UITABLE
It's not a style of the UITableView, but of the UITableViewCell:
- (UITableViewCell *)tableView:(UITableView *)tableView1 cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView1 dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
}
... more stuff
return cell;
}
精彩评论