title: Delegate method is not called swift ios?
body: <p>We have two controller - ControllerA and ControllerB. Controller A contains the normal button and text field(mail id). When we enter the mailid and tap the button. we will present the ViewControllerB and we have an option called to change the email and click back. We are using a delegate to pass the viewControllerB value to ViewController. But delegate function is not called.</p>
  
  <p>ViewControllerB :</p>
  
  <pre><code>protocol countryViewControllerDelegate{
    func passMailId(code: String)
  }
  
  var delegate: countryControllerDelegate?
  
  @IBAction func createNewFolder(_ sender: Any?) {
     delegate?.countryCode(code: emailText.text)
  self.dismiss(animated: true, completion: nil)
  
  }
  </code></pre>
  
  <p>ViewControllerA :</p>
  
  <pre><code> var instance = ViewControllerB()
  
      override func viewDidLoad() {
  
      instance.delegate = self
  }
  
  func showCoutryPicker(){
      self.performSegue(withIdentifier: "DropDown", sender: self)
    }
  
  
  extension ViewControllerA:countryViewControllerDelegate{
    func countryCode(code: String) {
      print(code)
    }
  
  }
  </code></pre>
  
  <p>Is any other way to fix this?</p>