在我的tableView中,我在单元格之间设置了分隔线。我允许选择多个单元格。以下是我设置选定单元格背景颜色的代码:
UIView *cellBackgroundColorView = [[UIView alloc] initWithFrame:cell.frame];
[cellBackgroundColorView setBackgroundColor:[UIColor darkGray]];
[cell setSelectedBackgroundView:cellBackgroundColorView];
问题在于,如果选择了相邻的两个单元格,在iOS7中它们之间没有分隔线,而在iOS6中有(正如预期的那样)。
我甚至尝试将cellBackgroundColorView
的框架高度设置为cell.frame - 1.0
,但这也不起作用。
有什么想法吗?