title: My collection view is nil when implicit unwrapping?
body: <p>I use a <code>UITabBarController</code> to manage the large middle button on the <code>UITabBar</code>. Here is a part of it.</p>
  <pre><code>class TabBarController: UITabBarController, UITabBarControllerDelegate, ContentChangedDelegate { 
           override func viewDidLoad() {
             super.viewDidLoad()
             setupMiddleButton()
           }
  
  func setupMiddleButton() {
      
      let tabBarHeight = tabBar.frame.size.height
      
     
      let menuButton = UIButton(frame: CGRect(x: 0, y: 0, width: tabBarHeight*1.5, height: tabBarHeight*1.5))
      var menuButtonFrame = menuButton.frame
      
      menuButtonFrame.origin.y = view.bounds.height - menuButtonFrame.height/2 - tabBarHeight - 8
  
      menuButtonFrame.origin.x = view.bounds.width/2 - menuButtonFrame.size.width/2
      menuButton.frame = menuButtonFrame
      
      menuButton.backgroundColor = UIColor.red
      menuButton.layer.cornerRadius = menuButtonFrame.height/2
      view.addSubview(menuButton)
      
      let largeConfiguration = UIImage.SymbolConfiguration(scale: .large)
      let addIcon = UIImage(systemName: &quot;plus&quot;, withConfiguration: largeConfiguration)
      menuButton.setImage((addIcon), for: .normal)
      
      menuButton.addTarget(self, action: #selector(menuButtonAction(sender:)), for: .touchUpInside)
      
      view.layoutIfNeeded()
  }
  
  @objc private func menuButtonAction(sender: UIButton) {
      AddViewController.delegate = self
      performSegue(withIdentifier: &quot;addEventSegue&quot;, sender: self)
  }
  </code></pre>
  <p>}
  and I conform another class LifeViewController(I used the class the specify the collecitonView and searchbar and other items in it) to tabBarController but the lifeCollectionView is always nil when implicitly unwrap, Could any one help me, Thank you so much!</p>
  <pre><code>class LifeViewController: TabBarController {
  
  let realm = try! Realm()
  var reminders : Results&lt;Memorandum&gt;!
  
  let tabBarView = TabBarController()
  
  @IBOutlet weak var searchBar: UISearchBar!
  @IBOutlet var lifeCollectionView: UICollectionView!
  
  override func viewDidLoad() {
      super.viewDidLoad()
   
      self.fetchData()
      lifeCollectionView.delegate = self
      lifeCollectionView.dataSource = self
     
      // Do any additional setup after loading the view.
  }
  
  override func viewWillAppear(_ animated: Bool) {
      self.fetchData()
  }
  
   override func reloadCollection() {
       if let life = self.lifeCollectionView {
                 life.reloadData()
             } else {
                 print(&quot;life found nil&quot;)
             }
  }
  
  func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
      performSegue(withIdentifier: &quot;editing&quot;, sender: self)
      
  }
  
  
  func fetchData() {
      
      reminders = realm.objects(Memorandum.self)
  
  }
  </code></pre>
  <p>}</p>
  <pre><code>//MARK: - CollectionView
  
  
  extension LifeViewController {
      
      
      override func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -&gt; CGSize {
           return CGSize(width: lifeCollectionView.frame.width/2.1, height: lifeCollectionView.frame.width/2.1)
       }
       
  
       
      override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
           return reminders.count
       }
       
      override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
           
           let reminder = reminders[indexPath.item]
           
           let lifeCell = lifeCollectionView.dequeueReusableCell(withReuseIdentifier: &quot;lifeCell&quot;, for: indexPath) as! ReminderCell
           
           lifeCell.configureCell(date: reminder.dateReminder, importance: UIColor(hex: reminder.color)!, name: reminder.title, depict: reminder.depiction)
               
           lifeCell.layer.cornerRadius = 12
           
           return lifeCell
           
       }
      
      
  }
  </code></pre>
  <p>But when I change back to conform the <code>LifeViewController</code> to <code>UIViewController</code>, and other collection view protocols the <code>IBOutlet</code>, <code>delegate</code> and <code>dataSource</code> work again? Why is that?</p>