title: IBOutlet not accessible in awakeFromNib in UITableViewCell
body: <p>As far as I can tell, I have set up everything correctly (register and dequeue). However, when I try and access outlets in awakeFromNib(), I get</p>
  <p>'Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value: file ....MechEntryCell.swift, line 18'</p>
  <p>Which is weird, since other UITableViewCells doing similar things seem to work fine - and look identical to me.</p>
  <p>The code failing:</p>
  <pre><code>class MechEntryCell: UITableViewCell {
  
      @IBOutlet weak var mechName: UILabel!
      
      override func awakeFromNib() {
          super.awakeFromNib()
          mechName.text = &quot;Hello&quot;    &lt;&lt;&lt;&lt;&lt;&lt;&lt; CRASHES
      }
  
      func setDamageOption(_ damageOption: AdditionalDamageOption) {
          mechName.font = UIFont.boldSystemFont(ofSize: mechName.font.pointSize)
          mechName.text = damageOption.label    &lt;&lt;&lt;&lt; WORKS FINE IF ABOVE CRASH REMOVED
      }
  }
  </code></pre>
  <p>which has a .xib file where the label has been correctly linked:
  <a href="https://i.stack.imgur.com/l6AGI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l6AGI.png" alt="enter image description here" /></a></p>
  <p>And I also register and dequeue:</p>
  <pre><code>override func viewDidLoad() {
          super.viewDidLoad()
  
          tableView.delegate = self
          tableView.dataSource = self
  
          tableView.register(UINib(nibName: MechEntryCell, bundle: nil), forCellReuseIdentifier: &quot;MechEntryCell&quot;)
  ........
  }
  
  func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return tempDamageOptions.count
      }
  
      func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          if let cell = tableView.dequeueReusableCell(withIdentifier: MechEntryCell.identifier) as? MechEntryCell {
              cell.setDamageOption(tempDamageOptions[indexPath.item])
              return cell
          }
          return UITableViewCell()
      }
  
      func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
          return 1
      }
  </code></pre>
  <p>Special Note:
  When I set the label in the tableView(cellforRowAt:) method, then it works fine - so the IBOutlet DOES eventually link. What am I doing wrong?</p>