ios - iOS-13 - UITableViewCell 的 CornerRadius
问题描述
UITableViewCell
我在其init
方法中设置了 a 层的cornerRadius 。它曾经在 iOS 12 和 11 中工作,但在最新版本的 iOS 中不起作用:iOS 13。
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
self.layer.cornerRadius = 10
}
单元格有边框,但是当我向左滑动时(trailingSwipeActionsConfigurationForRowAt),单元格错过了边框。
如何在 iOS 13cornerRadius
中设置?UITableViewCell
解决方案
改为在'scornerRadius
中进行修改。Apple 可能在 iOS 13 中限制了对 s 的层修改。UITableView
contentView
UITableView
UITableView
编辑:在'contentView
属性中进行任何视图修改。在运行时,iOS 在UITableView
的根视图中执行其他操作。我有一个问题,我无法UITableView
在 iOS 10 中的单元格内执行点击操作,我修复它的方法是将所有内容移到里面contentView
。
推荐阅读
- python - 在python中创建一个列来对数值进行分类
- reactjs - 导入功能组件时出错
- dropzone.js - 为什么 dropzoneJS 调整大小选项没有影响?
- javascript - yeoman-test 找不到子生成器
- angular - 离子角度下拉列表
- r - 在 R 中填充矩阵的更快方法
- mysql - 如何在 laravel 或 sql 中使用 like 选择数据而不考虑后字符
- python - `Layer.call` 的第一个参数必须始终传递
- python - 使用默认样式时,无法访问 MS-Word 文件中样式的属性,使用 python-docx
- android - Android - Recyclerview 内的 VideoView 匹配父宽度并保持纵横比