title: Data not showing in the UIcollection view. What did I do wrong
body: <p>My <code>UICollectionView</code> is not showing data, what did I do wrong?</p>
  <p>Here is the collection view controller class:</p>
  <pre><code>class SongfeedViewController: UIViewController,UICollectionViewDelegate,UICollectionViewDataSource {
  
      @IBOutlet weak var collectionview: UICollectionView!
      
      var posts = [Post]()
      
      private var song = [songs]()
      private var songsCollection : CollectionReference!
      
      override func viewDidLoad() {
          super.viewDidLoad()
          
          songsCollection = Firestore.firestore().collection(&quot;Songs&quot;)
      }
      
      override func viewWillAppear(_ animated: Bool) 
      {
          songsCollection.getDocuments { (snapshot, error) in
              if let err = error{
                  print(&quot;Error Fetching Docs:\(err)&quot;)
              
              } else {
                  guard let snap = snapshot else{return}
                  for document in snap.documents{
                      let data = document.data()
                      let fullname = data[&quot;fullname&quot;] as? String ?? &quot;Anonymous&quot;
                      let songname = data[&quot;songname&quot;] as? String ?? &quot;Anonymous&quot;
                      let youtubelink = data[&quot;youtubelink&quot;] as? String ?? &quot;Anonymous&quot;
                      let moneyoffer = data[&quot;moneyoffer&quot;] as? String ?? &quot;Anonymous&quot;
                      let instalink = data[&quot;instalink&quot;] as? String ?? &quot;Anonymous&quot;
                      
                      let newsong = songs(fullname: fullname, songname: songname, moneyoffer: moneyoffer, youtubelink: youtubelink, instalink: instalink)
                      
                      self.song.append(newsong)
                  }
  
                  self.collectionview.reloadData()
              }
          }
      }
      
      func numberOfSections(in collectionView: UICollectionView) -&gt; Int {
          return 1
      }
      
      func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
          return self.posts.count
      }
      
      func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
          let cell = collectionview.dequeueReusableCell(withReuseIdentifier: &quot;postCell&quot;, for: indexPath) as! postCell
          
          cell.artistnamelabel.text = self.posts[indexPath.row].fullname
          cell.moneyofferlabel.text = self.posts[indexPath.row].moneyoffer
          cell.instaUsernnamelabel.text = self.posts[indexPath.row].instalink
          cell.songnamelabel.text = self.posts[indexPath.row].songname
          cell.youtubelinklabel.text = self.posts[indexPath.row].youtubelink
          
          return cell
      }
  </code></pre>
  <p>The data from firestore is not showing on the UI collection view.</p>
  <p>A code from my postcell is below:</p>
  <pre><code>import UIKit
  
  class postCell: UICollectionViewCell {
      @IBOutlet weak var artistnamelabel: UITextField!
      @IBOutlet weak var moneyofferlabel: UITextField!
      @IBOutlet weak var songnamelabel: UITextField!
      
      @IBOutlet weak var youtubelinklabel: UITextField!
      @IBOutlet weak var instaUsernnamelabel: UITextField! 
  }
  </code></pre>