teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

インデントが悪かった

2021/10/01 08:21

投稿

yamato-0123
yamato-0123

スコア2

title CHANGED
File without changes
body CHANGED
@@ -1,16 +1,14 @@
1
1
  今までうまくいっていたのに、
2
2
  ```swift
3
3
  if indexPath.section == 1 {
4
- while (i <= count){
4
+ while (i <= count){
5
- if indexPath.row == Int(subjectNameCode[i]) {
5
+ if indexPath.row == Int(subjectNameCode[i]) {
6
- cell.setup(with: String(score[i]))
6
+ cell.setup(with: String(score[i]))
7
- print("点数:(score[i]) :(i)")
7
+ print("点数:(score[i]) :(i)")
8
- i += 1
8
+ i += 1
9
- }
10
-
11
- }
12
-
13
9
  }
10
+ }
11
+ }
14
12
  ```
15
13
  ここにwhile文を入れた途端にシュミレーターが真っ白で何も映らなくなってしまいました。
16
14
  ずっと繰り返し処理が行われて表示できなくなっていたりするのでしょうか。