title: Swift function async
body: <pre><code>func passcodeViewController(_ passcodeViewController: TOPasscodeViewController, isCorrectCode code: String) -&gt; Bool {
  
          let userDefault = UserDefaults.standard
          let tokenPinCode = userDefault.string(forKey: "tokenPinCode")
          let mailData = self.emailField.text
          let dataStruct = mailData!+"|"+tokenPinCode!
          print("1")
          self.checkToken(code: dataStruct) { (response) in
              if(response[0] == "OK"){
                  print("2")
                  self.alertPasswordChange(text: "Podaj nowe hasło", code: dataStruct)
              }else{
                  self.standardAlert(title: "Znaleziono błędy", message: "Podany kod jest błedny", ok: "Rozumiem")
                  self.werifyButton.isEnabled = true
              }
          }
          print("3")
          return false
      }
  </code></pre>
  
  <p><strong>Function returns:</strong> Print -> 1 -> 3 -> 2</p>
  
  <p><strong>How to get the effect to work out:</strong> Print -> 1 -> 2 -> 3</p>