質問編集履歴

2

情報修正

2019/11/18 19:09

投稿

globalplus
globalplus

スコア119

test CHANGED
File without changes
test CHANGED
@@ -74,6 +74,8 @@
74
74
 
75
75
  let otherUserLatitude = value?["userLatitude"] as? Double
76
76
 
77
+ //Argument passed to call that takes no argumentsのエラー
78
+
77
79
  let userDouble = User(Double: otherUserLatitude)
78
80
 
79
81
  })

1

情報修正

2019/11/18 19:09

投稿

globalplus
globalplus

スコア119

test CHANGED
File without changes
test CHANGED
@@ -68,19 +68,17 @@
68
68
 
69
69
  ref.child("userLatitude").child(user!).observeSingleEvent(of: .value, with: { (snapshot) in
70
70
 
71
+ // Get user value
72
+
71
73
  let value = snapshot.value as? NSDictionary
72
74
 
73
- let username = value?["userLatitude"] as? Double?
75
+ let otherUserLatitude = value?["userLatitude"] as? Double
74
76
 
75
- //Argument passed to call that takes no argumentsのエラーで困っています。
77
+ let userDouble = User(Double: otherUserLatitude)
76
78
 
77
- let user = User(username: username)
79
+ })
78
80
 
79
-
80
-
81
- // ...
82
-
83
- }) { (error) in
81
+ { (error) in
84
82
 
85
83
  print(error.localizedDescription)
86
84