zoukankan      html  css  js  c++  java
  • cell单选

    先上图给看看效果

    cell单选逻辑就是取出上一个选中的cell 设置图片为默认图片 在取出点击的cell 设置图片为选中图片即可

    废话不多说直接上代码

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

    {

        

       // [tableView deselectRowAtIndexPath:indexPath animated:YES];

        

        NSIndexPath * indexold = [NSIndexPath indexPathForRow:self.oldIndex inSection:self.oldSectionIndex];

        

        HBAutoReplyCell * cell = [tableView cellForRowAtIndexPath:indexold];

        cell.checkImageView.image = [UIImage imageNamed:@"CQweixuanzhong.png"];

        

        HBAutoReplyCell * cell2 = [tableView cellForRowAtIndexPath:indexPath];

        cell2.checkImageView.image = [UIImage imageNamed:@"CQxuanzhong.png"];

        

        self.oldSectionIndex = indexPath.section;

        self.oldIndex = indexPath.row;

        

    }

  • 相关阅读:
    程序员 你中毒了吗?
    Win8 下安装 Live Writer 发布博客
    Rational Rose 2003 下载及破解方法(转载)
    如何在dos 下使用csc.exe命令?
    as 与 is
    【转载】关于工资的三个秘密
    C#反射(1)<转>
    C#常用字符串格式
    微软企业库EntLib5.0使用过程中常见的异常
    关于window7 AERO 声音 IIS 无线网络失效的解决办法
  • 原文地址:https://www.cnblogs.com/supersr/p/6112296.html
Copyright © 2011-2022 走看看