objective-c - iOS6 中的 TableView 圆角半径不同

标签 objective-c ios uitableview ios6

我有一个带有分组 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/

相关文章:

ios - Facebook 喜欢 查看下面的导航栏

objective-c - 为什么我的 Cocoa 绑定(bind)损坏了?

ios - 分组 TableView - 了解选择了哪个单元格

ios - Cell.imageView.image 更改后不会自动加载

ios - 同一个UIView添加多个UIButtons只显示最后添加的按钮?

ios - 如何使用 NSURLCache 缓存 NSURLProtocol 提供的内容

ios - Swift:要求用户在单击每个停止按钮后输入文本文件名

ios - 在我的 scrollView 中,Line 在加载时运行了 3 次

ios - 当我通过按钮操作从 TableView 中删除单元格时,应用程序崩溃了 - iOS Swift

iphone - UISearchView 不显示搜索值