title: Updating a UILabel via protocol results in crash (found nil)
body: <p>I want to implement the MVP pattern for a new app. So the View shouldn't have any logic besides one that exclusively concerns UI elements. Therefore I want to request initial data from an "Interpreter" (interpreting user input in later code), which in turn requests data from my model and gives it to the "Presenter". The presenter holds a protocol with functions of the view.</p>
  
  <p>The problem is: Calling <code>updateUIData()</code> from the presenter results in a</p>
  
  <blockquote>
    <p>fatal error: unexpectedly found nil while unwrapping an Optional value</p>
  </blockquote>
  
  <p>while calling the function from within the View at the same position is working just fine.</p>
  
  <p>I suspect the error comes from the initialization of the specific MainViewController in the init of the presenter, but I don't know how to resolve this, if my guess is right.</p>
  
  <p>Here's my (relevant) code:</p>
  
  <p>MainViewController:</p>
  
  <pre><code>class MainViewController: UIViewController {
  
      lazy var interpreter = Interpreter() // lazy needed b/c Interpreter holds Presenter which holds MainViewController
  
      @IBOutlet var dateLabel: UILabel!
      @IBOutlet var totalTimeLabel: UILabel!
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // updateUIData()
          requestData()
      }
  
      func requestData() {
          interpreter.requestData()
      }
  
  }
  
  extension MainViewController: MainViewSetters {
  
      func updateUIData() {
          dateLabel.text = "Data"
          totalTimeLabel.text = "loaded"
      }
  
  }
  </code></pre>
  
  <p>MainViewSetters (Protocol):</p>
  
  <pre><code>protocol MainViewSetters {
      func updateUIData()
  }
  </code></pre>
  
  <p>Interpreter:</p>
  
  <pre><code>class Interpreter {
  
      let presenter = Presenter()
  
      func requestData() {
          // normally: get data from model and pass it to presenter
          presenter.presentData()
      }
  
  }
  </code></pre>
  
  <p>Presenter:</p>
  
  <pre><code>class Presenter {
  
      let mainView: MainViewSetters
  
      init(withMainViewController mainVC: MainViewSetters = MainViewController()) {
          mainView = mainVC
      }
  
      func presentData() {
          mainView.updateUIData()   
      }
  
  }
  </code></pre>