Heyou
This project is on alpha stage
Instanciate HYAlertController
let alertController = HYAlertController()
Add elements to the alert (in any order)
alertController.elements = [
.title("Title"),
.subTitle("A Subtitle"),
.image(named: "house"),
.description("A long description text goes here.")
]
Add actions (buttons)
let mainAction = HYAlertAction(title: "First main", style: .main)
let normalAction = HYAlertAction(title: "Normal button", style: .default)
let secondMainAction = HYAlertAction(title: "Second main", style: .main)
alertController.addAction(mainAction)
alertController.addAction(normalAction)
alertController.addAction(secondMainAction)
Show the alert
alertController.show(onViewController: self)
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
Installation
Heyou is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Heyou'
Author
etoledom, [email protected]
License
Heyou is available under the MIT license. See the LICENSE file for more info.