|  
 
 
p;          (12)如何设置tableview 可以被编辑                首先要进入编辑模式:               [cpp] view plaincopy
    [TableView setEditing:YES animated:YES];                  如果要退出编辑模式,肯定就是设置为NO                 - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath                 返回当前cell  要执行的是哪种编辑,下面的代码是 返回 删除  模式                [cpp] view plaincopy 
    - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath       {           return UITableViewCellEditingStyleDelete;       }                 -(void) tableView:(UITableView *)aTableView 
commitEditingStyle:(UITableViewCellEditingStyle) editingStyle 
forRowAtIndexPath:(NSIndexPath *)indexPath 
              通知告诉用户编辑了 哪个cell,对应上面的代码,我们在这个函数里面执行删除cell的操作。 
               [cpp] view plaincopy 
    -(void) tableView:(UITableView *)aTableView       commitEditingStyle:(UITableViewCellEditingStyle) editingStyle       forRowAtIndexPath:(NSIndexPath *)indexPath       {&n 上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页  
 |