func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
cell.viewcontroller = self
}
func reloadData(){
// reload function here, so when called it will reload the tableView
self.notificationTable.reloadData()
}
泰伯维细胞按钮代码Tableviewcell调用的UIView控制器功能不工作迅速IOS
@IBAction func deleteRecord(_ sender: Any) {
self.viewController.reloadData() //<--
}
获取错误
@ < -
NotificationTableViewCell.swift:64:18: 'UIViewController'的值没有成员'reloadData'
在这里'self.viewController.reloadData()'使用你的tableview名称为'self。 notificationTable.reloadData()' –
为什么你在tableViewCell中声明deleteRecord()? – KKRocks
你检查了max的答案吗? –