UIClosures是用Swift写成的closure库,用于UIKit。
简单示例:
button.on(.TouchUpInside, (sender: AnyObject) -> () { let button = sender as! UIButton button.setTitle("Pressed", forControlState:.Normal)})
UIClosures是用Swift写成的closure库,用于UIKit。
简单示例:
button.on(.TouchUpInside, (sender: AnyObject) -> () { let button = sender as! UIButton button.setTitle("Pressed", forControlState:.Normal)})
评论