Goku 1.5

Goku 1.5

测试已测试
Lang语言 SwiftSwift
许可协议 MIT
发布最后发布2017年7月
SwiftSwift版本3.1
SPM支持SPM

JerryShi维护。



Goku 1.5

  • Shi Wei

Goku是一个用swift 3编写的alert视图,支持action sheet和alert view样式。现在提供6种样式来显示您的alert。如果您想使用Swift 3的世界,您需要Xcode 8及以上版本。

屏幕截图

GIF GIF GIF

易于使用

提供默认的alert视图主题。因此,您可以使用此默认主题或创建您喜欢的主题。

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)")
		}
	)
})

有关更多使用,请参阅示例

图标来自SCLAlertView

安装

Goku通过Cocoapods提供。

将以下行添加到您的Podfile

pod 'Goku', '~> 1.0'

待办事项

  • [ ] 更多动画
  • [x] 更丰富的语法
  • [x] 类似于SnapKit的使用

许可协议

Goku是根据MIT许可协议发布的。有关详细信息,请参阅LICENSE。