回答編集履歴
2
コメントによる変更
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
//全選択解除
|
14
14
|
|
15
|
-
for i in 0..<
|
15
|
+
for i in 0..<checkListView.numberOfRows(inSection: 0) {
|
16
16
|
|
17
17
|
let indexPath = IndexPath(row: i, section: 0)
|
18
18
|
|
1
コメントに対しての追記
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
|
7
|
-
sectionがひとつだけの場合
|
7
|
+
sectionがひとつだけの場合。sectionも複数の場合はループを追加してください。
|
8
8
|
|
9
9
|
```
|
10
10
|
|
@@ -12,16 +12,26 @@
|
|
12
12
|
|
13
13
|
//全選択解除
|
14
14
|
|
15
|
-
for i in 0..<
|
15
|
+
for i in 0..<selectCell.count {
|
16
16
|
|
17
|
-
let indexPath =
|
17
|
+
let indexPath = IndexPath(row: i, section: 0)
|
18
|
+
|
19
|
+
let cell = checkListView.cellForRow(at: indexPath)
|
20
|
+
|
21
|
+
cell?.accessoryType = .none
|
18
22
|
|
19
23
|
checkListView.deselectRow(at: indexPath, animated: true)
|
20
24
|
|
21
25
|
}
|
22
26
|
|
23
|
-
reloadInputViews()
|
24
|
-
|
25
27
|
}
|
26
28
|
|
27
29
|
```
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
回答追記:
|
34
|
+
|
35
|
+
`cell?.accessoryType = .none`もやる必要がありだったので書き直しました。
|
36
|
+
|
37
|
+
わからない部分や動かない点があったら教えてください。
|