TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Jul 2017 |
SwiftSwift Version | 3.1 |
SPMSupports SPM | ✗ |
Maintained by JerryShi.
Goku is an alert view written by swift 3, support both action sheet and alert view style. And now provide 6 styles to show your alert. If you want to use the world of Swift 3, you need Xcode 8+.
Provide a default theme of alert view. So you can use this default theme or create a theme you like.
import Goku
// 🌟 Usage 👇
self.goku.presentAlert(animated: true, closure: { (make) in
make.theme
.actionSheet
.title("Okay/Cancel")
.message("A customizable action sheet message.")
.cancel("Cancel")
.destructive("OK")
.normal(["Button1", "Button2"])
.tapped({ (index) in
print("Tapped index is \(index)")
}
)
})
self.goku.presentAlert(animated: true, closure: { (make) in
make.theme
.alert
.success
.title("Congratulations!")
.message("You've just displayed this awesome Pop Up View.")
.cancel("Cancel")
.normal(["Default 1", "Default 2"])
.tapped({ (index) in
print("Tapped index is \(index)")
}
)
})
For more usage you can see Example
Icon image from SCLAlertView
Goku is available through Cocoapods.
Add the following line to you Podfile
pod 'Goku', '~> 1.0'
SnapKit
Goku is released under the MIT license. See LICENSE for details.