allowsSelectionDuringEditing을 true로 해도 스와이프가 안먹을때!!!!
self.tableView.allowsSelectionDuringEditing = true
editingStyleForRowAt을 구현했음에도!!!! 스와이프가 안먹을때!!!!!!!!
override func tableView(_ tableView: UITableView, editingStyleForRowAt indexPath: IndexPath) -> UITableViewCell.EditingStyle {
return .delete
}
commit을 구현하니까 되네....중간에 확인해보려다가 안되서... 전부 구현하고 확인하면 이런일은 없을것이다
override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
tableView.deleteRows(at: [indexPath], with: .fade)
} else if editingStyle == .insert {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}
'Other > Swift' 카테고리의 다른 글
집단자료형(배열/집합/튜플/딕셔너리) - 작성필요 (0) | 2019.05.03 |
---|---|
테이블뷰 하단에 빈셀 표시 막기(tableFooterView) (0) | 2019.05.03 |
UITextField 커서 안깜빡이게 하기 (0) | 2019.04.29 |