UITableview 中获取非选中的cell

 

实现效果如图:

在cell中有一个button,选中cell改变button的选择状态 yes,选中另外一个cell,别的cell中的button选择状态变成false。

 
//获取当前可显示的cell 的 IndexPath
for (NSIndexPath *ind in [tableView indexPathsForVisibleRows]) {
         AuthorizationCell *cell=(AuthorizationCell *)[tableView cellForRowAtIndexPath:ind];
        [cell.bt_radion setSelected:false];
    }
    
    AuthorizationCell *cell=(AuthorizationCell *)[tableView cellForRowAtIndexPath:indexPath];
    [cell.bt_radion setSelected:!cell.bt_radion.selected];

 

posted @ 2015-03-17 13:36  爱生活爱代码  阅读(223)  评论(0编辑  收藏  举报