background image

  

[topicsTable setContentSize:CGSizeMake(0,controller.promiseNum * 44)];  
//右侧添加一个索引表  
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView{  
}  
//返回 Section 标题内容  
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{ 
}  
//自定义划动时 del 按钮内容  
- (NSString *)tableView:(UITableView *)tableView  
titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath  
//跳到指的 row or section  
[tableView 

scrollToRowAtIndexPath:[NSIndexPath 

indexPathForRow:0 

inSection:0] 

atScrollPosition:UITableViewScrollPositionBottom animated:NO];  
四、在

UITableViewCell 上建立 UILable 多行显示  

(UITableViewCell 

*)tableView:(UITableView 

*)tableView 

cellForRowAtIndexPath:

(NSIndexPath *)indexPath {  
static NSString *CellIdentifier = @"Cell";  
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];  
if (cell == nil) {  
cell  =  [[[UITableViewCell  alloc]  initWithFrame:CGRectZero  reuseIdentifier:CellIdentifier] 
autorelease];  
UILabel *Datalabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, 320, 44)];  
[Datalabel setTag:100];  
Datalabel.autoresizingMask 

UIViewAutoresizingFlexibleWidth 

UIViewAutoresizingFlexibleHeight;  
[cell.contentView addSubview:Datalabel];  
[Datalabel release];  
}  
UILabel *Datalabel = (UILabel *)[cell.contentView viewWithTag:100];  
[Datalabel setFont:[UIFont boldSystemFontOfSize:18]];  
Datalabel.text = [data.DataArray objectAtIndex:indexPath.row];  
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;  
return cell;  
}  
//选中 cell 时的颜色  
typedef enum {  
UITableViewCellSelectionStyleNone,  
UITableViewCellSelectionStyleBlue,  
UITableViewCellSelectionStyleGray  
} UITableViewCellSelectionStyle  
//cell 右边按钮格式  
typedef enum {  
UITableViewCellAccessoryNone, // don't show any accessory view