一个属性定义一个block
<pre> typealias TitLeBlock = ()->()
var accessLabel: String?
// 创建一个这个类型的 block
typealias titleBlock = ()->()
// 必须自己初始化一个block
var block: titleBlock?
init(title: String?, accessLabel: String?,block: titleBlock) {
super.init()
self.title = title
self.accessLabel = accessLabel
self.block = block
}</pre>
网友评论