質問編集履歴
1
コードの追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -119,6 +119,11 @@
|
|
119
119
|
let item: TodoModel = self.itemList[(indexPath as NSIndexPath).row]
|
120
120
|
|
121
121
|
item.done = !item.done
|
122
|
+
// Realm に保存したデータを UIAlertController に入力されたデータで更新
|
123
|
+
let realmInstance = try! Realm()
|
124
|
+
try! realmInstance.write{
|
125
|
+
itemList[indexPath.row].done = item.done
|
126
|
+
}
|
122
127
|
// リロードしてUIに反映
|
123
128
|
self.todoTableView.reloadData()
|
124
129
|
}
|