<small id='h5cY2'></small><noframes id='h5cY2'>

      • <bdo id='h5cY2'></bdo><ul id='h5cY2'></ul>

      <legend id='h5cY2'><style id='h5cY2'><dir id='h5cY2'><q id='h5cY2'></q></dir></style></legend>
    1. <i id='h5cY2'><tr id='h5cY2'><dt id='h5cY2'><q id='h5cY2'><span id='h5cY2'><b id='h5cY2'><form id='h5cY2'><ins id='h5cY2'></ins><ul id='h5cY2'></ul><sub id='h5cY2'></sub></form><legend id='h5cY2'></legend><bdo id='h5cY2'><pre id='h5cY2'><center id='h5cY2'></center></pre></bdo></b><th id='h5cY2'></th></span></q></dt></tr></i><div id='h5cY2'><tfoot id='h5cY2'></tfoot><dl id='h5cY2'><fieldset id='h5cY2'></fieldset></dl></div>

        <tfoot id='h5cY2'></tfoot>

        在 UITablView 单元格的选定状态上更改图像

        时间:2023-06-01
        <i id='l5tZX'><tr id='l5tZX'><dt id='l5tZX'><q id='l5tZX'><span id='l5tZX'><b id='l5tZX'><form id='l5tZX'><ins id='l5tZX'></ins><ul id='l5tZX'></ul><sub id='l5tZX'></sub></form><legend id='l5tZX'></legend><bdo id='l5tZX'><pre id='l5tZX'><center id='l5tZX'></center></pre></bdo></b><th id='l5tZX'></th></span></q></dt></tr></i><div id='l5tZX'><tfoot id='l5tZX'></tfoot><dl id='l5tZX'><fieldset id='l5tZX'></fieldset></dl></div>

          <bdo id='l5tZX'></bdo><ul id='l5tZX'></ul>
        • <legend id='l5tZX'><style id='l5tZX'><dir id='l5tZX'><q id='l5tZX'></q></dir></style></legend>
            <tbody id='l5tZX'></tbody>
        • <tfoot id='l5tZX'></tfoot>

          <small id='l5tZX'></small><noframes id='l5tZX'>

                  本文介绍了在 UITablView 单元格的选定状态上更改图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我创建了一个自定义单元格并添加了一个标签和图像,我的表格中有 4 行,每行有一个不同的图像,每行打开一个不同的视图控制器,所以,现在我需要的是点击我想改变图像的特定行我试过了,但它不起作用,所以请帮帮我.

                  I have a created a custom cell and added one label and Image, I have 4 rows in my table each row has a different image and each row opens a different view controller, so, now what I need is on click of a particular row I want the image to change to do that I tried this, but its not working, so please help me out.

                  if(indexPath.row == 0)
                  {
                  
                       if(cell.selected == true)
                       {
                             UIImage *cellImage = [UIImage imageNamed:@"abc.png"];        
                             cell.icon.image    = cellImage;
                        }
                        else
                        {
                            UIImage *cellImage = [UIImage imageNamed:@"abc.png"];        
                             cell.icon.image    = cellImage;
                        }
                  }
                  

                  问候兰吉特

                  推荐答案

                  尝试在创建单元格时或在 tableView:willDisplayCell:forRowAtIndexPath: 方法中执行以下操作:

                  Try to do following when creating your cell or in tableView:willDisplayCell:forRowAtIndexPath: method:

                  cell.imageView.image = [UIImage imageNamed:@"abc.png"];
                  cell.imageView.highlightedImage = [UIImage imageNamed:@"abc.png"];
                  

                  如果它是 UIImageView

                  这篇关于在 UITablView 单元格的选定状态上更改图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在 iOS 5 上设置 sqlite config SQLITE_CONFIG_SERIALIZED 返回 下一篇:iOS:如何正确获取电池电量

                  相关文章

                  最新文章

                  • <bdo id='XWEKW'></bdo><ul id='XWEKW'></ul>

                  <small id='XWEKW'></small><noframes id='XWEKW'>

                • <i id='XWEKW'><tr id='XWEKW'><dt id='XWEKW'><q id='XWEKW'><span id='XWEKW'><b id='XWEKW'><form id='XWEKW'><ins id='XWEKW'></ins><ul id='XWEKW'></ul><sub id='XWEKW'></sub></form><legend id='XWEKW'></legend><bdo id='XWEKW'><pre id='XWEKW'><center id='XWEKW'></center></pre></bdo></b><th id='XWEKW'></th></span></q></dt></tr></i><div id='XWEKW'><tfoot id='XWEKW'></tfoot><dl id='XWEKW'><fieldset id='XWEKW'></fieldset></dl></div>

                      <tfoot id='XWEKW'></tfoot><legend id='XWEKW'><style id='XWEKW'><dir id='XWEKW'><q id='XWEKW'></q></dir></style></legend>