We have the UI developed and we won't add any new visual elements. Each cell contains an avatar image and an avatar name. Our only task is to fetch all user profiles and load the information in each cell. This is not a trivial task. We will use a dictionary to store the profiles of all the different users. Then, we can start the loading and, once we have all the profiles, we can refresh UIViewCollection:
var users = [String: UserModel?]()
This is the only new property which we will add to HomeFeedViewController. Then we have to add a new model to the DataManager.swift—UserModel:
class UserModel { var avatarPhoto:String? var username:String? init() { //nothing } init?(snapshot:DataSnapshot) { if let dict = snapshot.value ...