在对表格UITableView操作时,有时当用户选中表格行后,需要自动取消选择。实现这种效果,其原理是选中表格行时,会调用 didSelectRowAtIndexPath方法,只要在这个方法中,调用performSelector执行取消选中表格行的方法。示例代码如下:
01 |
- void ) |
02 |
{ |
03 |
// |
04 |
[self.tableView |
05 |
[self.tableView |
06 |
} |
07 |
|
08 |
- void )tableView:(UITableView |
09 |
didSelectRowAtIndexPath:(NSIndexPath |
10 |
{ |
11 |
// |
12 |
... |
13 |
|
14 |
|