ios - Want to transfer or copy data from one cell button to another cell label of same tableview -
cell vc---->
@ibaction func datepickertapped(_ sender: any) { datepickerdialog().show("datepickerdialog", donebuttontitle: "done", cancelbuttontitle: "cancel", datepickermode: .date) { (date) in if let dt = date { let formatter = dateformatter() formatter.dateformat = "dd-mm-yyyy" let result = formatter.string(from: dt) self.buttondate.settitle("\(result)",for: .normal) } } }
parent vc---->
let cell = tableview.dequeuereusablecell(withidentifier: "cell2", for: indexpath)as! twoprofittableviewcell let date = date() let formatter = dateformatter() formatter.dateformat = "dd.mm.yyyy" let result = formatter.string(from: date) if self.responseapi.count > 0 { cell.chart_view.chartdescription?.text = self.responseapi["graph_data"]["axis_data"]["axisname"].stringvalue cell.chart_view.legend.enabled=true cell.chart_view.highlightperdragenabled = false cell.chart_view.animate(xaxisduration: 2.0, yaxisduration: 2.0) cell.chart_view.leftaxis.drawlabelsenabled = true cell.chart_view.leftaxis.enabled = true cell.chart_view.rightaxis.drawlabelsenabled = true cell.chart_view.rightaxis.enabled = true cell.cmlt_prft.text = " ₹ cumulative profit :- rs.\(self.responseapi["graph_data"]["stats"]["cumulativeprofit"] .stringvalue)" cell.prft.text = " ₹ profit of \(result) :- rs.\(self.responseapi["graph_data"]["stats"]["profit"] .stringvalue)" setchart(cell.chart_view,datapoints:block_val, values: breakeven_price_val) } cell.selectionstyle = .none return cell
here in parent cell label
want copy date picker value
of cell viewcontroller
Comments
Post a Comment