title: My UICollectionViewCell item is nil?
body: <p>My CollectionViewCell imageView is nil</p>
  
  <p><strong>My Cell File is here</strong></p>
  
  <pre><code>class MyTicketsCollectionViewCell: UICollectionViewCell {
  
       @IBOutlet weak var imgTicket: UIImageView!
  }
  </code></pre>
  
  <p><strong>My Controller File Code is here</strong></p>
  
  <pre><code>class MyTicketsCollectionViewController: UICollectionViewController {
  
       var photos: [String] = ["ticket1","ticket2","ticket3","ticket4"]
  
       override func viewDidLoad() {
       super.viewDidLoad()
  
           self.collectionView?.register(MyTicketsCollectionViewCell.self, forCellWithReuseIdentifier: "MyTicketsCollectionViewCell")
  
       }
  
       override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
  
           return photos.count
       }
  
       override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
  
  
           let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "MyTicketsCollectionViewCell", for: indexPath) as! MyTicketsCollectionViewCell
  
           cell.imgTicket.image = UIImage(named: photos[indexPath.row])
  
          return cell
      }
  
  }
  </code></pre>
  
  <p>Error is "Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value"</p>
  
  <blockquote>
    <p>When I debug it then</p>
  
  <pre><code> cell.imgTicket is nil
  </code></pre>
  </blockquote>
  
  <p>How solve this issue?</p>