title: Swift: Error Reloading CollectionView
body: <p>I am creating a social media app and have a collection view to display each image that the user posts. I am having a problem reloading the collection view so that it will display the images immediately after a post. Currently, images will be displayed when the user signs out and then signs back in.</p>
  
  <p>I have been using this code to reload my <code>UICollectionView</code>:</p>
  
  <pre><code>self.collectionView.reloadData()
  </code></pre>
  
  <p>However, no matter where I place that line of code in my project I return the error:</p>
  
  <blockquote>
    <p>"Thread 1: EXC_BAD_INSTRUCTION" </p>
  </blockquote>
  
  <p>and in some places it also returns: </p>
  
  <blockquote>
    <p>"fatal error: unexpectedly found nil while unwrapping an optional value" </p>
  </blockquote>
  
  <p>Does anyone have an idea on why this may be happening? Any help would greatly be appreciated.</p>