【问题标题】:Change color of uitableviewcell 'delete' section when in editing mode in iOS7在iOS7中处于编辑模式时更改uitableviewcell“删除”部分的颜色
【发布时间】:2013-09-28 07:01:51
【问题描述】:

我觉得这是一个有点愚蠢的问题,但我无法解决。我有一个显示子分类的 uitableviewcells 的 uitableview。当我滑动以启用编辑模式时,我想将出现的红色更改为不同的红色阴影。我能做到吗?

我尝试过更改背景颜色或添加子视图

-(void)willTransitionToState:(UITableViewCellStateMask)state

被调用,但我无法仅在主单元格的“删除”部分发生任何事情。我还在 initWithCoder 中为 self.editingaccessoryview 添加了一个子视图,但我仍然无法做出任何事情。

感谢您的帮助

【问题讨论】:

    标签: iphone uitableview ios7


    【解决方案1】:

    我也面临同样的问题,最后我已经克服了。看到这个给定的答案

    Highlighted color problem of cell is solved in IOS-7 in this link.

    【讨论】:

      【解决方案2】:

      可能是您在 cellForRowAtIndexPath(委托方法)中为 Cell 设置单元格 setBackgroundImage。不要在这里设置。将您的图像设置在:

      -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { cell.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"cellList.png"]]; }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-12-26
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-12-15
        • 1970-01-01
        相关资源
        最近更新 更多