I have a class which is called InvoicesViewController "first image"
in that class there are cells that come from the API and each cell has a Label which represents a price of an item and a button near that price which segues you to PayViewController "second image"
and now i want that the UITextField in the PayViewController "second image" to be filled with the selected cell's label price.
I hope I am clear and someone guides me to the appropriate answer since i can't wrap my head around this one :)
This is my Code of the tableView :
 func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int 
    let data = notifications.Result![changeCustomerKey.DefaultsKeys.keyTwo].properties?[0].invoices
        
    return data?.count ?? 0
}
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    guard let cell = tableView.dequeueReusableCell(withIdentifier: "invoicesCell", for: indexPath) as? invoicesModel else { return UITableViewCell() }
    
    let currentNotifications = notifications.Result![changeCustomerKey.DefaultsKeys.keyTwo].properties?[0].invoices
    let currentInvoices = currentNotifications![indexPath.row]
    
    cell.mainPriceLabelInvoices.text = "€\(currentInvoices.priceWithVAT ?? 0.00)"
    return cell
}

