回答編集履歴
1
コードのインデント等を修正
test
CHANGED
@@ -3,7 +3,9 @@
|
|
3
3
|
ありがとうございました。
|
4
4
|
|
5
5
|
```swift
|
6
|
+
@IBAction func addTodo(_ sender: UIButton) {
|
6
|
-
tableView.beginUpdates()
|
7
|
+
tableView.beginUpdates()
|
8
|
+
|
7
9
|
// テーブルの最終行を、IndexPathとして取得
|
8
10
|
let lastRowIndex = tableView.numberOfRows(inSection: 0)
|
9
11
|
let indexPath = IndexPath(row: lastRowIndex, section: 0)
|
@@ -23,4 +25,5 @@
|
|
23
25
|
if let cell = tableView.cellForRow(at: indexPath) as? TodoCell {
|
24
26
|
cell.todoText.becomeFirstResponder()
|
25
27
|
}
|
28
|
+
}
|
26
29
|
```
|