- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
//取消选中颜色
UIView *backView = [[UIView alloc] initWithFrame:cell.frame];
cell.selectedBackgroundView = backView;
cell.selectedBackgroundView.backgroundColor = [UIColor clearColor];
//取消边框线
[cell setBackgroundView:[[UIView alloc] init]]; //取消边框线
cell.backgroundColor = [UIColor clearColor];
}
//在navigation中tableviewCell选中后返回无选中项
//单击一个cell
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = (UITableViewCell *)[tableView cellForRowAtIndexPath:indexPath];
if(cell.tag == 0){
//注销cell单击事件
cell.selected = NO;
}else {
[tableView deselectRowAtIndexPath:[tableView indexPathForSelectedRow] animated:YES]; //取消选中项
BabyScheduler *babyScheduler=[listData objectAtIndex:indexPath.row-1];
[delegate showVaccinationView:babyScheduler];
}
}
分享到:
相关推荐
设置UITableView Section的背景颜色和字体颜色,很详细
UITableView、UITableView基本用法、UITableView详解,UITabelView常用方法
UITableView相关操作
cell 全选 uitableview 表 全部 选择
UITableView Cache - UITableView 缓存
UITableView教材 IPHONE IPAD
TTIndexBar 一个允许设置颜色的自定义UITableView索引
UITableview在编辑状态下的批量选择与左滑删除等相关功能的实现
UITableView 详细讲解
IOS UITableView UIcollectionView 结合
UITableView用来以表格的形式显示数据。关于UITableView,我们应该注意: (1)UITableView用来显示表格的可见部分,UITableViewCell用来显示表格的一行。 (2)UITableView并不负责存储表格中的数据,而是仅仅存储...
UITableView 缩进 附属视图 Cell Demo
UITableView通过重用单元格来达到节省内存的目的:通过为每个单元格指定一个重用标识符 reuseIdentifier 即指定了单元格的种类 以及当单元格滚出屏幕时 允许恢复单元格以便重用 对于不同种类的单元格使用不同的ID ...
iOS UITableView查询及索引UISEARCHBAR
UITableView 三级菜单
这是iPhone之UITableView入门的示例程序,具体参考: http://blog.csdn.net/htttw/article/details/7875462
UITableView的简单使用
UITableview处理键盘遮挡 没有实现控件复用导致的出现重复文本,以及部分bug。
UICollectionView,UITableView用法,UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];