Swift工具包
2021-01-11 本文已影响0人
霸_霸霸
-
Closures
为UIKit和Foundation提供闭包表达式,如
button.onTap {
// UIButton tapped code
}
view.addPanGesture() { pan in
// UIPanGesutreRecognizer recognized code
}
button.onTap {
// UIButton tapped code
}
view.addPanGesture() { pan in
// UIPanGesutreRecognizer recognized code
}