Custom Alert example written in swift. It uses Xib for UI design and delegate to handle Custom Alert actions.
Create a Custom Alert Controller in Swift step by step Medium.com
- Download the RTCustomAlert folder
- Drag and drop RTCustomAlert folder in your project
- Add below code to configure and display alert
let customAlert = RTCustomAlert()
customAlert.alertTitle = "Thank you"
customAlert.alertMessage = "Your order successfully done."
customAlert.alertTag = 1
customAlert.statusImage = UIImage.init(named: "smiley")
customAlert.isCancelButtonHidden = true
customAlert.delegate = self
customAlert.show()