Last active
September 5, 2016 19:41
-
-
Save 0ber/40cd265d0edf9e096a3a7ea0163d8441 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension SwiftyActions { | |
var action: UIAlertAction { | |
switch self { | |
case .Default(let title, let handler): return UIAlertAction(title: title, style: .Default, handler: handler) | |
case .Cancel(let title, let handler): return UIAlertAction(title: title, style: .Cancel, handler: handler) | |
case .Destructive(let title, let handler): return UIAlertAction(title: title, style: .Destructive, handler: handler) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment