반응형
iOS Swift 테이블뷰 스와이프 삭제 (TableView swipe delete)
UITableView 를 Swipe 해서 cell 을 remove 해보겠습니다. 코드로 작성해야합니다. func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { if editingStyle == .delete { dataArray.remove(at: indexPath.row) tableView.deleteRows(at: [indexPath], with: .fade) } else if editingStyle == .insert { } } 이렇게 작성하면 끝입니다. 잘 나오네요. 전체 코드입니다. import UIKit class ViewCon..
iOS Swift + UIKit
2021. 1. 21. 09:48
반응형