gpt4 book ai didi

ios - 圆角原型(prototype)iOS9.2

转载 作者:行者123 更新时间:2023-12-01 20:18:03 26 4
gpt4 key购买 nike

如何将 UITableViewCells 中的单元格更改为圆角?有点像这样:

Rounded corners on cells

我喜欢存在的差距,那么是否也可以调整它?

最佳答案

在你可以设置的 UITableViewCell 的 ContentView 中,这条线得到圆角。

self.layer.cornerRadius = 5.0
self.clipsToBounds = true
self.layer.masksToBounds = true

要给出间隙,您需要将默认内容 View 设置为 Clear Color(透明),并在单元格内添加一个 View ,其尺寸小于单元格。

它在 Storyboard 中看起来像这样。
enter image description here

关于ios - 圆角原型(prototype)iOS9.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36272152/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com