Skip to content

arpitjain03/AJAlertController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AJAlertController

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.

Sample1     Sample2

Requirements

iOS 9.0+ and Swift 4 are required.

Installation

Just Drag and Drop AJAlertController folder in your project.

Features

  • 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.

Example

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)
}

Usage

Initialization

AJAlertController.initialization()

Display an Alert

public func showAlert( message:String, cancelButton:String?, otherButton:String?, completion : alertCompletionBlock) 

Display an Alert with OK Button

public func showAlertWithOkButton( message:String, completion : alertCompletionBlock)

License

AJAlertController is available under the MIT license. See the LICENSE file for more info.

Author

For any queries and suggestions reach out at arpit.cor@gmail.com

About

AJAlertController is a simple, customisable alert view written in Swift. It is well managed for working on all screens and devices supporting iOS 9.0 and later.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages