質問編集履歴
1
コードで抜けていたところを追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -41,6 +41,34 @@
|
|
41
41
|
}
|
42
42
|
|
43
43
|
}
|
44
|
+
|
45
|
+
}
|
46
|
+
|
47
|
+
override func viewWillAppear(_ animated: Bool) {
|
48
|
+
|
49
|
+
super.viewWillAppear(animated)
|
50
|
+
|
51
|
+
database.collection("users").document(userID).setData(
|
52
|
+
|
53
|
+
["userID": userID], merge: true)
|
54
|
+
|
55
|
+
database.collection("users").document(userID).getDocument { (snapshot, error) in
|
56
|
+
|
57
|
+
if error == nil, let snapshot = snapshot, let data = snapshot.data() {
|
58
|
+
|
59
|
+
self.students = AppUser(data: data)
|
60
|
+
|
61
|
+
let appUser = AppUser(data: data)
|
62
|
+
|
63
|
+
print(appUser.userName)
|
64
|
+
|
65
|
+
}
|
66
|
+
|
67
|
+
}
|
68
|
+
|
69
|
+
tableView.reloadData()
|
70
|
+
|
71
|
+
|
44
72
|
|
45
73
|
}
|
46
74
|
|