1 张图片
UIKit 的扩展,可以在 Swift 中使用闭包。
Scream.swift 是 UIKit 的包装器,允许您用闭包代替目标选择器。
self.button = (UIButton.buttonWithType(.Custom) as UIButton).now{ btn in //Custom button ... }.clicked { btn in //Do something }.when(label:"repeat") { //Do something }
Is this hosted on GitHub?
If this control is hosted on GitHub, paste the address below, otherwise click "Not Hosted on GitHub".