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;

        

    }

  • 相关阅读:
    MATLAB新手教程
    关于Core Location-ios定位
    《TCP/IP具体解释卷2:实现》笔记--IP的分片和重装
    利用JasperReport+iReport进行Web报表开发
    Surface、SurfaceView、SurfaceHolder及SurfaceHolder.Callback之间的关系
    Openfire开发配置,Openfire源码配置,OpenFire二次开发配置
    在Activity中为什么要用managedQuery()
    24点经典算法
    linux概念之时间与时区
    java实现第五届蓝桥杯大衍数列
  • 原文地址:https://www.cnblogs.com/supersr/p/6112296.html
Copyright © 2011-2022 走看看