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的答案嗎? –