cell
typealias closureBlock = (String)->Void;
var postValueBlock:closureBlock?
vc
cell.postValueBlock = {(btnText) in
let story = UIStoryboard.init(name: "Main", bundle: nil)
let VC:dailyReportVC = story.instantiateViewController(withIdentifier: "dailyReportVC") as! dailyReportVC;
VC.showStr = btnText;
VC.type = dailyReportEnum.dailyReport;
VC.postValueBlock = {(str) in
cell.valueBtn.setTitle(str, for: UIControlState.normal);
}
self.present(VC, animated: true, completion: nil);
}
cell
@IBAction func valueBtnClick(_ sender: Any) {
postValueBlock!((valueBtn.titleLabel?.text)!);
}