3
연락처를 추가하는 것처럼 버튼을 터치하면 셀을 자동으로 슬라이드하는 방법은? 거기에 대리인이 있습니까? commitEditingStyle
을하면 모든 작업이 완료됩니다! -자동으로 셀을 슬라이드/스 와이프하는 방법 tableviewcell swift 3
연락처를 추가하는 것처럼 버튼을 터치하면 셀을 자동으로 슬라이드하는 방법은? 거기에 대리인이 있습니까? commitEditingStyle
을하면 모든 작업이 완료됩니다! -자동으로 셀을 슬라이드/스 와이프하는 방법 tableviewcell swift 3
당신은 delegate
방법을 구현해야합니다 (-) 모든 세포에 대한 기호를
self.yourTableView.setEditing(true, animated: true)
당신이 버튼의 클릭에 할 수있는
func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath)
{
// below code will delete one row - you can mange another kind of deletion here like delete from database also
if editingStyle == .Delete
{
yourDataArray.removeAtIndex(indexPath.row)
self.yourTableView.reloadData()
}
}
그리고
일 등, 보여!
@aldo 또한 버튼을 나타 내기 위해 셀을 스 와이프 할 수있는'editActionsForRowAtIndexPath'를 확인해 볼 수 있습니다. – GoodSp33d
예! 질문자는'editActionsForRowAtIndexPath'도 살펴 봐야합니다 !! @ GoodSp33d – Lion
@ GoodSp33d (-) 버튼을 탭하면 셀을 스 와이프하여 삭제 버튼을 표시하고 싶습니다. –