0
childrenCount
をstring
としてtableview
label
に取得しようとしています。それはすべてのthousを印刷しますが、何らかの理由でそれらをラベルに入れません。firebase childrenテーブルビューのラベルに入る
私が間違っていることは、あなたは言うことができますか?
私はcellForRowAtIndexPath
内でこれを達成するために
snapshot.childrenCount
を使用
:
let ref = FIRDatabase.database().reference().child("Snuses").queryOrderedByChild("Brand").queryEqualToValue(brands[indexPath.row])
print(snapshot.childrenCount)
snusProductCountLabel.text = snapshot.childrenCount as? String
}
}
})
これは私がスクロールとしてコンソールに出力されます。
7
3
8
3
26
5
5
1
8
3
10
このノードを含むJSONツリーに 'Snuses'を与えてください。 – Dravidian
@Dravidianは私の編集をチェックします。 –