https://github.com/adrum/tvalert
tvOS style alerts
https://github.com/adrum/tvalert
Last synced: over 1 year ago
JSON representation
tvOS style alerts
- Host: GitHub
- URL: https://github.com/adrum/tvalert
- Owner: adrum
- License: mit
- Created: 2016-04-09T21:53:30.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-12-18T19:43:29.000Z (over 9 years ago)
- Last Synced: 2025-03-05T22:06:05.106Z (over 1 year ago)
- Language: Swift
- Homepage:
- Size: 934 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TVAlert
[](https://img.shields.io/travis/adrum/tvalert)
[](http://cocoapods.org/pods/TVAlert)
[](http://cocoapods.org/pods/TVAlert)
[](http://cocoapods.org/pods/TVAlert)

## Usage
TVAlert's usage is the same as `UIAlertController`. Just replace `UI` with `TV` on both `UIAlertController` and `UIAlertAction`
```swift
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](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod "TVAlert"
```
## Author
Austin Drummond, adrum0x7@gmail.com
## License
TVAlert is available under the MIT license. See the LICENSE file for more info.