I have a variable "NameofCircle" on LocationVC ViewController and i have variable CName on this Controller i want to pass the CName value to LocationVC Controller by popToViewController. I tried below code but did not get the result.
let viewControllers = self.navigationController!.viewControllers
for aViewController in viewControllers
{
if aViewController is LocationVC
{
let Location = LocationVC()
Location.NameofCircle = CName
_ = self.navigationController?.popToViewController(aViewController, animated: true)
}
}