func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
return true
}
func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
if((self.arrNews.count) > 0 ){
let mdPost = arrNews[indexPath.row] as! ModelNews
DataManager.deleteToBookmarkOnlyData(md: DataManager.getByIdBookmarkOnlyData(id_news: mdPost.m_object_id!))
self.reloadData()
}
}
}
Không có nhận xét nào:
Đăng nhận xét