When the login process is of type Post using Alamofire
I want to show the sign in progress while waiting for the server
....
For example, such as the view above the login screen appears when you press the login button and disappear when you enter the home screen
This solution did not work :::
func show () {
let alert = UIAlertController(title: nil, message: "Please wait...", preferredStyle: .alert)
let loadingIndicator = UIActivityIndicatorView(frame: CGRect(x: 10, y: 5, width: 50, height: 50))
loadingIndicator.hidesWhenStopped = true
loadingIndicator.style = UIActivityIndicatorView.Style.gray
loadingIndicator.startAnimating();
alert.view.addSubview(loadingIndicator)
vc.present(alert, animated: true, completion: nil)
// vc.dismiss(animated: false, completion: nil)
}