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

質問編集履歴

1

(.childAdded, with: { (snapshot) in

2018/03/08 15:36

投稿

ishiishiyay
ishiishiyay

スコア33

title CHANGED
File without changes
body CHANGED
@@ -25,8 +25,8 @@
25
25
 
26
26
  var audioPlayer: AVAudioPlayer!
27
27
 
28
- Database.database().reference.child("Media_Messages").observe(.childAdded){
28
+ Database.database().reference.child("Media_Messages").observe(.childAdded, with:{
29
- (snapshot:DataSnapshot) in
29
+ (snapshot) in
30
30
 
31
31
  print(snapshot)
32
32
  /*出力結果:
@@ -61,7 +61,7 @@
61
61
  }).resume()
62
62
  }
63
63
  }
64
- }
64
+ } , withCancel:nil)
65
65
 
66
66
 
67
67
  //collectionviewで再生