AJAlertController is a simple, customizable alert view written in Swift. It is well managed for working on all screens and devices supporting iOS 9.0 and later.
iOS 9.0+ and Swift 4 are required.
Just Drag and Drop AJAlertController
folder in your project.
- Easy to use anywhere, as it is added on topmost view controller.
- Convenient alert view with title, message and buttons
- Appears with transition animations
- Easily customizable appearance, including fonts, colours, corner radius, shadow, overlay colour and blur, etc.
- Can be dismissed on background tap.
- Works on all screens and devices supporting iOS 9.0 and later.
You can find this example in the project repo. To see it in action clone the repo and run the sample project.
/// Pass alert message, cancel button title, other button title
AJAlertController.initialization().showAlert(message: "This is Alert message with two buttons", cancelButton: "NO", otherButton: "YES") { (index, title) in
print(index,title)
}
/// Pass alert message
AJAlertController.initialization().showAlertWithOkButton(message: "This is normal alert message") { (index, title) in
print(index,title)
}
AJAlertController.initialization()
public func showAlert( message:String, cancelButton:String?, otherButton:String?, completion : alertCompletionBlock)
public func showAlertWithOkButton( message:String, completion : alertCompletionBlock)
AJAlertController
is available under the MIT license. See the LICENSE file for more info.
For any queries and suggestions reach out at arpit.cor@gmail.com