teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

情報修正

2019/11/18 19:09

投稿

globalplus
globalplus

スコア119

title CHANGED
File without changes
body CHANGED
@@ -36,6 +36,7 @@
36
36
  // Get user value
37
37
  let value = snapshot.value as? NSDictionary
38
38
  let otherUserLatitude = value?["userLatitude"] as? Double
39
+ //Argument passed to call that takes no argumentsのエラー
39
40
  let userDouble = User(Double: otherUserLatitude)
40
41
  })
41
42
  { (error) in

1

情報修正

2019/11/18 19:09

投稿

globalplus
globalplus

スコア119

title CHANGED
File without changes
body CHANGED
@@ -33,13 +33,12 @@
33
33
  @IBAction func othersLocation(_ sender: Any)
34
34
  {
35
35
  ref.child("userLatitude").child(user!).observeSingleEvent(of: .value, with: { (snapshot) in
36
+ // Get user value
36
37
  let value = snapshot.value as? NSDictionary
37
- let username = value?["userLatitude"] as? Double?
38
+ let otherUserLatitude = value?["userLatitude"] as? Double
38
- //Argument passed to call that takes no argumentsのエラーで困っています。
39
- let user = User(username: username)
39
+ let userDouble = User(Double: otherUserLatitude)
40
-
41
- // ...
40
+ })
42
- }) { (error) in
41
+ { (error) in
43
42
  print(error.localizedDescription)
44
43
  }
45
44
  }