使用最新的 iOS 13 Beta
我真的不明白这是测试版问题还是我的问题, 但我在 iOS 12 上没有这个问题
代码
let button = UIButton(type: .custom)
button.setTitle("connect", for: .normal)
button.backgroundColor = UIColor(rgb: 0xFF0E83)
button.sizeToFit()
cell.accessoryView = button
cell.textLabel?.text = "Title"
cell.detailTextLabel?.text = "Subtitle"
结果
有人遇到同样的问题并找到解决方案吗?谢谢
最佳答案
如果您将 uibutton 放入 uiview 中,它将在 iOS 13.0 上运行。
关于iOS 13 UITableViewCell自定义accessoryView出界,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57791055/