简体   繁体   English

两个 UITableView 单元格/部分之间的黑色边框

[英]Black border between two UITableView cells/sections

I'm trying to figure out how I would go about achieving the visual effect in the screenshot below.我试图弄清楚我将如何实现下面屏幕截图中的视觉效果。

在此处输入图像描述

The black line between Options 2 and 3 is the part I'm struggling with.选项 2 和 3 之间的黑线是我正在努力解决的部分。 Would this require two tables?这需要两张桌子吗? Or is there a way to do this using section headers?或者有没有办法使用节标题来做到这一点?

The best way to do it would be with different sections in the UITableView and the section headers between them.最好的方法是使用 UITableView 中的不同部分以及它们之间的部分标题。 You have the ability to resize the space between the sections, so you could set it to the height you need.您可以调整部分之间的空间大小,因此可以将其设置为所需的高度。 As for the background, there are lots of different ways to get the black line itself (backing image, custom drawn background for the UIView, etc.)至于背景,有很多不同的方法来获取黑线本身(背景图像,UIView 的自定义绘制背景等)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM