使用Apple的UIAccessibility中的辅助功能自定义操作
您只需要设置辅助功能自定义操作:
cell.accessibilityCustomActions = [UIAccessibilityCustomAction(name: "Delete", target: self, selector: #selector(theCustomAction))]@objc private func theCustomAction() -> Bool { //Do anything you want here return true}更新:
因此,我确实重新创建了该项目,但是这次我使用的是Storyboards(不是最后一次),我从Cocoapods导入了SwipeCellKit库,并遵循了他们的文档,VoiceOver在删除indexPath.row中的单元格方面工作得很好。没问题。



