我使用 iOS 11 UITableViewDragDelegate
/UITableViewDropDelegate
对为多个 TableView 添加了拖放功能。
有什么方法可以让我访问源表对象,以便我可以对其调用 .reloadData()
吗?
最佳答案
这部分我不清楚
Is there any way for me to get access to the source table object
但是,您可以使用属性观察器didSet
在每次变量修改时重新加载tableView。
这样的东西应该有效,
var dataSrouce: [String] = [] { // your data source object.
didSet {
tableView.reloadData() // reload the tableView using that data source.
}
}
关于ios - 在performDropWith委托(delegate)回调中访问源 TableView ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55333305/