title: Swift Ios setting delegate without self as other view controller
body: <p>I have seen everywhere that delegate variable is always set to self.</p>
  
  <pre><code>thirdClass.delegate = self
  </code></pre>
  
  <p>So i want something like </p>
  
  <pre><code>thirdViewController.delegate = firstViewControllerToDo
  </code></pre>
  
  <p>In my case,</p>
  
  <pre><code>let thirdClassVar = thirdClass()
  thirdClassVar.namVar = "somnam"
  thirdClassVar.delegate = firstViewControllerToDo
  self.performSegueWithIdentifier("gtoFirstViewcontroller", sender: self)
  </code></pre>
  
  <p>When i click on button in second screen, it wil return back to first screen but in background I want to do some calculation in thirdClass and after completion of that, it shud display a message in first screen.</p>
  
  <p>How can i achieve this or is there any other way of getting this done.</p>