質問編集履歴
1
コードで抜けていたところを追記しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -21,6 +21,20 @@
|
|
21
21
|
}
|
22
22
|
}
|
23
23
|
}
|
24
|
+
override func viewWillAppear(_ animated: Bool) {
|
25
|
+
super.viewWillAppear(animated)
|
26
|
+
database.collection("users").document(userID).setData(
|
27
|
+
["userID": userID], merge: true)
|
28
|
+
database.collection("users").document(userID).getDocument { (snapshot, error) in
|
29
|
+
if error == nil, let snapshot = snapshot, let data = snapshot.data() {
|
30
|
+
self.students = AppUser(data: data)
|
31
|
+
let appUser = AppUser(data: data)
|
32
|
+
print(appUser.userName)
|
33
|
+
}
|
34
|
+
}
|
35
|
+
tableView.reloadData()
|
36
|
+
|
37
|
+
}
|
24
38
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
25
39
|
return 10
|
26
40
|
}
|