Skip to content

adrum/tvalert

Repository files navigation

TVAlert

CI Status Version License Platform

preview

Usage

TVAlert's usage is the same as UIAlertController. Just replace UI with TV on both UIAlertController and UIAlertAction

let alertController = TVAlertController(title: "Title", message: "Message", preferredStyle: .alert)

alertController.style = style

let OKAction = TVAlertAction(title: "OK", style: .default) { (action) in
// ...
}
alertController.addAction(OKAction)

let cancelAction = TVAlertAction(title: "Cancel", style: .cancel) { (action) in
// ...
}
alertController.addAction(cancelAction)


self.present(alertController, animated: true) {
// ...
}

Requirements

Installation

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

pod "TVAlert"

Author

Austin Drummond, adrum0x7@gmail.com

License

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