Swift block

Healp 类方法里

import UIKit

class Healp: NSObject {

  class  func stringblock(title:String, blockp:(_ backMes : String) ->() ){

        blockp(title)

    }

}

 调用

  Healp .stringblock(title: "sss") { (backBlock) -> () in
            print("backBlock===",backBlock)
        }

实例方法前边不带class 类方法带

posted @ 2017-08-07 18:04  LiziBlog  阅读(192)  评论(0编辑  收藏  举报