进入编辑模式时保持UITableViewCell背景颜色 [英] Maintain UITableViewCell background color when going into edit mode

查看:126
本文介绍了进入编辑模式时保持UITableViewCell背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为所有UITableViewCells设置了背景颜色。但是,当我单击我的UIBarButtonItem编辑时,删除和可拖动图标会扭曲背景颜色,使背后的白色背景。有没有办法解决?我可以在必要时显示代码,但这似乎是一个非常简单的问题。

I have set background colors for all my UITableViewCells. However, when I click my UIBarButtonItem "edit", the delete and the draggable icons distort the background color, making white background behind them. Is there any way around this? I can show code if necessary, but this seems like a pretty straightforward question.

推荐答案

这是<$的默认行为在编辑模式下c $ c> uitableviewcells 。尝试再次在tableViewCells中设置背景颜色

This is the default behavior of the uitableviewcells in the editing mode. Try setting the background color for your tableViewCells again in

 - (void)setEditing:(BOOL)editing animated:(BOOL)animate
{
if(editing)
{
  // set background color
}

else {
}

如果需要,请尝试将背景颜色设置为您的属性,以便您可以在此处进行设置。

If needed, try setting your background color as your property so that you can set it up here.

这篇关于进入编辑模式时保持UITableViewCell背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆