title: Alert button to dismiss Alert and go back to previous View Controller
body: <p>I'm kind of new to Swift and I can't figure this out. I have an Alert that should show on a successful URL request. After a user clicks an <code>Ok</code> button on the alert, I need the alert dismissed and I need the presented controller to go back in the navigation stack to the previous view controller. I don't get any errors but nothing happens. If I move the entire code for the Alert inside the CustomClass, then it works fine. I assume I am not referencing the CustomClass the right way. Any help would be greatly appreciated! </p>
  
  <pre><code> struct Alert {
      static func CustomAlert(vc: UIViewController, title: String, message: String){
  
          var title = "Title...!"
          var message = "Message..."
          let myAlert = UIAlertController(title: title, message: message, preferredStyle: .alert)
          myAlert.addAction(UIAlertAction(title: "Ok", style: .default, handler: { (actin) in
              myAlert.dismiss(animated: true, completion: nil)
              let vc = CustomClass()
              vc.GoBackToPreviousVC()
          }))
           vc.present(myAlert, animated: true, completion: nil)
      }
   }
  
   class: CustomClass: UIViewController {
  
      func GoBackToPreviousVC(){
          navigationController?popViewController(animated: true)
      }
  
      function Download(){
  
        code for URLRequest...
  
        DispatchQueue.main.async {
          if (self.response.Status == "200"){
              Alert.CustomAlert(vc: self, title: "", message: "")
          }
  
        }
  
      }
  }
  </code></pre>