質問編集履歴

1

追記

2022/06/19 11:16

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -67,3 +67,21 @@
67
67
  https://teratail.com/questions/137199 の内容は試しましたがViewControllerが再描画されると消えてしまいます。
68
68
 
69
69
 
70
+ ### 仮説
71
+
72
+ ```
73
+ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
74
+
75
+ if ... (特定の番号を持っている場合){
76
+ // 背景色:赤
77
+ } ele {
78
+ // 背景:白
79
+ }
80
+ }
81
+ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
82
+ // 選択したrowを保存する
83
+ }
84
+ ```
85
+
86
+ みたいな処理が正しいのでしょうか?
87
+