Goku 1.5

Goku 1.5

TestsTested ✗
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jul 2017
SwiftSwift Version 3.1
SPMSupports SPM ✗

Maintained by JerryShi.



Goku 1.5

  • By
  • Shi Wei

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+.

Screenshots

GIF GIF GIF

Easy to use

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

Installation

Goku is available through Cocoapods.

Add the following line to you Podfile

pod 'Goku', '~> 1.0'

TODO

  • [ ] More animation
  • [x] More beautiful syntax
  • [x] Usage like SnapKit

License

Goku is released under the MIT license. See LICENSE for details.