我有一个带有分组 UITableView 的简单应用。在每个单元格的最左侧,我有一个缩略图图像,并手动创建了顶部和底部图像以具有与分组 TableView 的角相匹配的曲线。
这在 iOS6 之前一直有效。看起来半径略有不同,这给我留下了空白。
为了让它在 iOS5 和 6 之间保持一致,有没有办法改变圆角半径?我试过更改 cell.backgroundView.layer.cornerRadius,但没有任何区别。
如有任何帮助,我们将不胜感激!
最佳答案
你试过把它放在 cornerRadius 之后吗?
cell.backgroundView.clipsToBounds = YES;
Setting this value to YES causes subviews to be clipped to the bounds of the receiver. If set to NO, subviews whose frames extend beyond the visible bounds of the receiver are not clipped. The default value is NO. UIView Class Reference
关于objective-c - iOS6 中的 TableView 圆角半径不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12785892/