Swift tableView单元格中的泄漏指示器为';t显示

Swift tableView单元格中的泄漏指示器为';t显示,swift,xcode,uitableview,cell,Swift,Xcode,Uitableview,Cell,我在我的cellForRowAt委托中添加了cell.accessoryType=.discoverageindicator,我还在“附件”下的viewControllerUI选项中勾选了它。我还向表视图添加了边距,使其相对于父视图(即设备)为0 我甚至设置了cell.accessoryView?.tintColor=UIColor.black,以防颜色出现问题。但是,我还是看不到牢房右侧的小箭头。我正在使用默认的单元格。在其他viewControllers中,它可以工作,但在这一个中它不能工作

我在我的
cellForRowAt
委托中添加了
cell.accessoryType=.discoverageindicator
,我还在“附件”下的
viewController
UI选项中勾选了它。我还向
表视图添加了边距,使其相对于父视图(即设备)为0

我甚至设置了
cell.accessoryView?.tintColor=UIColor.black
,以防颜色出现问题。但是,我还是看不到牢房右侧的小箭头。我正在使用默认的
单元格
。在其他
viewControllers
中,它可以工作,但在这一个中它不能工作

我检查了单元格和tableview的宽度,它们都是375

如果我改为添加自定义图像,它会起作用,如下所示:

let img = UIImage.init(named: "arrow")
cell.accessoryView = UIImageView.init(image: img)
但是,我想要标准箭头


关于这里可能出现的问题,还有什么提示吗?

如果您的目标是iOS 13,那么这将不起作用。您可以在iOS12上进行验证,但今年早些时候我遇到了这个问题,解决方案是在单元格中添加一个UIButton,将其限制在屏幕的背面

let dispositionButton=UIButton()
exposureButton.setImage(UIImage(名为:“箭头”),用于:。正常)
cell.addSubview(披露按钮)
disclosureButton.TranslatesAutoResizezingMaskintoConstraints=false
dispositionButton.trailingAnchor.constraint(等式:cell.trailingAnchor,常数:-10)。isActive=true
DispositionButton.centerYAnchor.constraint(等式:cell.centerYAnchor,常量:0)。isActive=true
DispositionButton.widthAnchor.constraint(equalToConstant:25).isActive=true
disclosureButton.heightAnchor.constraint(equalToConstant:25).isActive=true