我将UITableViewCell子类化。然后,在我的故事板中,我向superview添加了一个图像。该图像具有以下限制:
<div>
我把-5作为底部约束的原因是因为我希望它覆盖分隔线。
但是,在此解决方案中,图像位于线下而不是线上。
答案 0 :(得分:3)
由于分隔符视图和单元格的内容视图在视图层次结构中处于同一级别,因此您可以使用contentView
在分隔符上显示内容视图,但是如果您使用分隔符,则可能会覆盖它cell.bringSubviewToFront(cell.contentView)
的背景颜色。您所要做的就是设置
cellForRowAtIndexPath
<a href="javascript: void(0)" class="pull-right margin-r" onclick="
document.theForm.action='/p1234/DownloadData';
$('#theForm').append($('<input>', {type:'hidden', name:'Download', value:'Download'})).submit();
"><img src="/images/download.png" title="Download" alt="Download" style="" border="0"></a>
中的。如果这不符合您的需求,您可以使用自定义分隔符实现自己的自定义单元格。