Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 UITableViewCells 中的单元格更改为圆角?有点像这样:
我喜欢存在的差距,那么是否也可以调整它?
在你可以设置的 UITableViewCell 的 ContentView 中,这条线得到圆角。
self.layer.cornerRadius = 5.0 self.clipsToBounds = true self.layer.masksToBounds = true
要给出间隙,您需要将默认内容视图设置为清除颜色(透明),并在单元格内添加一个视图,其尺寸小于单元格。
它在情节提要中看起来像这样。