Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.4 KB

README.md

File metadata and controls

55 lines (40 loc) · 1.4 KB

OYSimpleAlertController

OYSimpleAlertController is very simple Alert written in Swift.

alt tag

Usage

let alert = OYSimpleAlertController(title: "Title", message: "message")
let defaultAction = OYAlertAction(title: "OK", actionStyle: .Default, actionHandler: {
print("OK")
})

alert.addAction(defaultAction)

presentViewController(alert, animated: true, completion: nil)

Design

###Title

alert.alertTitleColor = UIColor.whiteColor()
alert.alertTitleFont = UIFont.boldSystemFontOfSize(23)
alert.alertTitleBackgroundColor  = UIColor(red: 46/255.0, green: 204/255.0, blue: 113/255.0, alpha: 1.0)  

###Message

alert.messageColor = UIColor.blackColor()
alert.messageFont = UIFont.systemFontOfSize(18)

###Button

alert.buttonFont = UIFont.boldSystemFontOfSize(23)
alert.buttonTextColor = UIColor.whiteColor()
alert.buttonBackgroundColors[.Default] = UIColor(red: 3/255.0, green: 169/255.0, blue: 244/255.0, alpha: 1.0)

Installation

OYSimpleAlertController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "OYSimpleAlertController"

Author

oyuk, [email protected]

License

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