행을 스 와이프하고 편집 작업 필드를 누른 후 편집 가능한 상태가되고 나머지 행 스 와이프가 비활성화되어야하는 경우 표보기 셀에 10 개의 행이 있다고 가정합니다.swift 2.2에서 선택된 행을 제외하고 tableviewCell 행 스 와이프 기능을 비활성화 할 수 있습니까?
func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]?
{
/*to perform edit action on row*/
let edit = UITableViewRowAction(style: UITableViewRowActionStyle.Normal, title: "Edit"){(UITableViewRowAction,NSIndexPath) -> Void in
let cell:SuppliersCutomTableViewCell = tableView.cellForRowAtIndexPath(indexPath) as! SuppliersCutomTableViewCell
print("indexPath",indexPath)
/*making Field Editable method*/
cell.textFieldedit()
}
edit.backgroundColor = UIColor(red: 0.298, green: 0.851, blue: 0.3922, alpha: 1.0);
return [edit]
}
완벽하게 작동합니다. – anand
환영합니다, 해피 코딩 :) –