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

質問編集履歴

3

文章の修正

2020/10/15 09:21

投稿

Atsushi_Kygo
Atsushi_Kygo

スコア7

title CHANGED
File without changes
body CHANGED
@@ -116,19 +116,4 @@
116
116
  ### 補足情報(FW/ツールのバージョンなど)
117
117
 
118
118
  Swift 5.3
119
- Xcode 12.0.1
119
+ Xcode 12.0.1
120
-
121
-
122
- ### 追記
123
- tableViewでinsertRowsをするとエラーは発生せず、正常に動作しました。
124
- reloadDataをするのは厳しいでしょうか?
125
- ```Swift
126
- cellNum += 1
127
-
128
- tableView.performBatchUpdates({
129
- // self.tableView.reloadData() 
130
- self.tableView.insertRows(at: [IndexPath(row: 0, section: 0)], with: .automatic)
131
- }) { (finished) in
132
- print("===== リロード完了後の処理 ======")
133
- }
134
- ```

2

追記

2020/10/15 09:20

投稿

Atsushi_Kygo
Atsushi_Kygo

スコア7

title CHANGED
File without changes
body CHANGED
@@ -116,4 +116,19 @@
116
116
  ### 補足情報(FW/ツールのバージョンなど)
117
117
 
118
118
  Swift 5.3
119
- Xcode 12.0.1
119
+ Xcode 12.0.1
120
+
121
+
122
+ ### 追記
123
+ tableViewでinsertRowsをするとエラーは発生せず、正常に動作しました。
124
+ reloadDataをするのは厳しいでしょうか?
125
+ ```Swift
126
+ cellNum += 1
127
+
128
+ tableView.performBatchUpdates({
129
+ // self.tableView.reloadData() 
130
+ self.tableView.insertRows(at: [IndexPath(row: 0, section: 0)], with: .automatic)
131
+ }) { (finished) in
132
+ print("===== リロード完了後の処理 ======")
133
+ }
134
+ ```

1

コードの修正

2020/10/15 09:10

投稿

Atsushi_Kygo
Atsushi_Kygo

スコア7

title CHANGED
File without changes
body CHANGED
@@ -87,12 +87,6 @@
87
87
  }
88
88
 
89
89
 
90
- // セクションの数
91
- func numberOfSections(in tableView: UITableView) -> Int {
92
- return 1
93
- }
94
-
95
-
96
90
  // セルの数
97
91
  func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
98
92
  return cellNum