1

I want an AlertView controller create one time and can open from all controllers and open also from none UIKIT Class (an Class which is not inherited from UIviewController and Dose not import UIKIT I need optimise way for do thi) can someone Help me on This Thanks in Advance

let alert = UIAlertController(title: "success" , message: "Image Uploaded Succesfully", preferredStyle: .alert)
    let alertOk = UIAlertAction(title: "OK", style: .default) { (action) in
        self.dismiss(animated: true, completion: nil)
    }
    alert.addAction(alertOk)
    present(alert, animated: true, completion: nil)

0 Answers0