2
override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
if condition == true {
let pause = UITableViewRowAction(style: .Destructive, title: "pause") { action, index in
print("pause button tapped")
return [pause]
}
} else {
return .None
}
}
이 코드는 셀에서 스 와이프를 사용 중지하지 않았습니다. 그러나 셀을 스 와이프하면 삭제 옵션이 나타납니다. 누구나이 문제를 해결할 수 있습니다.신속하게 조건이 false이면 tableView에서 셀을 스 와이프 할 수 없으십니까?
http://stackoverflow.com/questions/34550291/disable-cell-swipe-action. –