UITableViewCell单元格设置为不可点击

来源:互联网 发布:淘宝群控系统骗局 编辑:程序博客网 时间:2024/05/18 03:25


UITableViewCell设置为点击后没有阴影,在单元格的.m文件加入代码:


- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{    }
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {   // [super setSelected:selected animated:animated];//必须注释掉    // Configure the view for the selected state}


//这个方法是用来点击某个单元,松手后去掉阴影显示的。

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{    [tableView deselectRowAtIndexPath:indexPath animated:NO];}




0 0
原创粉丝点击