CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ | 
| LangLanguage | SwiftSwift | 
| License | MIT | 
| ReleasedLast Release | Apr 2016 | 
| SPMSupports SPM | ✗ | 
Maintained by Oleg Adamov.
AOAlertController looks like a usual UIAlertController, but each action item, titles, fonts and colors can be customized.
pod 'AOAlertController' AOAlertSettings class as default style for all alert controllerstitleFontmessageFontdefaultActionFontcancelActionFontdestructiveActionFontbackgroundColorlinesColortitleColormessageColordefaultActionColordestructiveActionColorcancelActionColortapBackgroundToDismissExample: AOAlertSettings.sharedSettings.backgroundColor = UIColor.redColor() - this means that for all instances of the AOAlertController red background will be set as default.
Properties set to individual controllers have a higher priority than properties from AOAlertSettings
Controller styles
AOAlertControllerStyle.AlertAOAlertControllerStyle.ActionSheetAvailable controller’s properties
actionItemHeightbackgroundColorlinesColortitleColortitleFontmessageColormessageFonttapBackgroundToDismissExample:
let alert = AOAlertController(title: "Title", message: nil, style: .Alert)
alert.titleFont = UIFont(name: "AvenirNext-Bold", size: 14)!Action styles
AOAlertActionStyle.DefaultAOAlertActionStyle.CancelAOAlertActionStyle.DestructiveAvailable properties
colorfontExample:
let actionCancel = AOAlertAction(title: "Cancel", style: .Cancel, handler: nil)
actionCancel.color = UIColor.orangeColor()
alert.addAction(actionCancel)Full usage Example:
let alert = AOAlertController(title: "Example Alert", message: "All in one", style: .Alert)
let action = AOAlertAction(title: "Default Action", style: .Default) {}
action.color = UIColor.blackColor()
let cancel = AOAlertAction(title: "Cancel", style: .Cancel, handler: nil)
alert.addAction(action)
alert.addAction(cancel)
self.navigationController?.presentViewController(alert, animated: false, completion: nil)