background image

cell.text=//.....  
return cell;  
}  
//行缩进  
-(NSInteger)tableView:(UITableView 

*)tableView 

indentationLevelForRowAtIndexPath:

(NSIndexPath *)indexPath{  
NSUInteger row = [indexPath row];  
return row;  
}  
//改变行的高度  
-  (CGFloat)tableView:(UITableView  *)tableView  heightForRowAtIndexPath:(NSIndexPath 
*)indexPath{  
return 40;  
}  
//定位  
[TopicsTable setContentOffset:CGPointMake(0, promiseNum * 44 + Chapter * 20)];  
//返回当前所选 cell  
NSIndexPath *ip = [NSIndexPath indexPathForRow:row inSection:section];  
[TopicsTable 

selectRowAtIndexPath:ip 

animated:YES 

scrollPosition:UITableViewScrollPositionNone];  
[tableView setSeparatorStyle:UITableViewCellSelectionStyleNone];  
//选中 Cell 响应事件  

(void)tableView:(UITableView 

*)tableView 

didSelectRowAtIndexPath:(NSIndexPath 

*)indexPath{  
[tableView deselectRowAtIndexPath:indexPath animated:YES];//选中后的反显颜色即刻消失  
}  
//判断选中的行(阻止选中第一行)  
-(NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath 
*)indexPath  
{  
NSUInteger row = [indexPath row];  
if (row == 0)  
return nil;  
return indexPath;  
}  
//划动 cell 是否出现 del 按钮  

(BOOL)tableView:(UITableView 

*)tableView 

canEditRowAtIndexPath:(NSIndexPath 

*)indexPath {  
}  
//编辑状态  

(void)tableView:(UITableView 

*)tableView 

commitEditingStyle:

(UITableViewCellEditingStyle)editingStyle  
forRowAtIndexPath:(NSIndexPath *)indexPath  
{