複数の選択肢(年)または(すべて)を選択し、残りのセルは消えます(チェックマーク)。 ユーザーがそれぞれキャンセルできないようにしたい(チェックマーク)。Checkmark TableView Multiple Swift 3.0の追加方法
この私のコードは: -
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let cell = tableView.cellForRow(at: indexPath)
cell?.accessoryType = .checkmark
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! yearsCell
cell.years?.text = Years[indexPath.row]
return cell }
詳細を入力する必要があります。あなたは何を望んでいますか、何があなたのために働いていませんか? – Magnas
@Magnas私は次のようになります: - 1.ユーザーは任意の(年)またはキャンセルを選択できます。 2.ユーザーの選択(すべて)がすべてのセルの消えます(チェックマーク)。 3.ユーザーはすべてをキャンセルすることはできません(チェックマーク)既定値(すべて)。 –