import UIKit

class ClassAVC: UIViewController {

    var callBackSelectedPrice:((String)->())!

    @IBAction func confirmTapped(_ sender: Any) {
          self.callBackSelectedPrice("any price")
     }

}

class BViewC: UIViewController {
      //MARK: Currency Change
      func tapCurrencyView() {
        let currVC = AViewC()
       currVC.modalPresentationStyle = .overCurrentContext
       currVC.callBackSelectedPrice = { currName in
       DispatchQueue.main.async {
            self.tableView.reloadData()
        }
       }
     self.present(currVC, animated: true, completion: nil)
   }
}

Advertisements