我想通过Dictionary将闭包传递给objective-c类。 如何实现呢?
在我的快速课程中:
let printTest: (_ para: String)->Void = { word in
print(word)
}
var dic = ["element":printTest]
var vc = CustomViewController()
vc.dict = dic
self.navigationController?.pushViewController(vc, animated: true)
如何在Objective-c类中从dict中获得闭包?以及如何调用printTest?