FirebaseUI Firestore无法在iOS上检索数据

时间:2018-08-28 13:36:55

标签: ios firebase google-cloud-firestore firebaseui

用于FirebaseUI-Firestore iOS的documentation不够全面,我已经实现了代码,但是没有填充我的收藏夹视图:

zPosition

在Android上,adapter.startListening()方法将放置在onResume()内以便开始检索数据,但iOS似乎没有这种方法。上面的代码是否足以开始检索数据?

1 个答案:

答案 0 :(得分:0)

发现我的错误。从FirebaseUI源代码注释:

* The returned data source is not retained by the collection view and must be
* retained or it will be deallocated while still in use by the collection view.

确实,文档示例确实将其存储在self.datasource中,而我的代码将其存储在本地。因此,通过使数据源成为ViewController的成员来解决此问题。