I am stuck on one issue, I have a following case
I have a Parent VC
It has 2 containers [childVC A, childVC B]
API is calling on childVC (UIViewController) A
As soon as childVC A receives response, half response should be populated on same childVC A and half response should be populated on its Parent VC [at same time, without using segue]
For this I have gone through the delegate and protocol methodology using this, they have used the segue, I don't want the segue.
Example perspective, I have gone through the example of Add To Cart methodology in which user will select the product from childVC and value will be added to the cart of parent VC
Adding the api call inside the child makes you have to use the delegate or access the parent if it's the rootvc , instead make the call inside the parent and use this to access the child
if let child1 = self.children.first as? FirstVC { // suppose it's at index 0
// send the data to child
}