2017-03-07 39 views
0

我有一个火力点结构设置如下:无法访问火力地堡捕捉数据

enter image description here

每个键都包含,我想用它来填充UICollectionView数据。但是,我无法访问Firebase数据。在Android中,我使用了类似于

的方法
dataSnapshot.child("xxx").getValue() 

但是,该类型的辅助功能在iOS中似乎不可用。下面是我想的方法:

 self.dataSource = self.collectionView?.bind(to: self.ref.child("Polls")) { collectionView, indexPath, snap in 
     let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) as! PollCell 
     /* populate cell */ 
     cell.pollQuestion.text = snap.child("question").getvalue 
      print(indexPath) 

     return cell 
    } 

我接收状态的值类型的错误“FIRDataSnapshot”没有成员的孩子

回答