I have three view controllers. The initial view controller has a container view inside it that I want use it as a image slider inside first view controller. So I put some other views inside first VC that show informations about image of container view. For ability to change slides, I use the third VC of type Page View Controller. I want the third VC manage paging for VC of container view. My problem is that I confused in this architecture. I know about dependency injection and delegation pattern and passing parameters from parent to child and vice versa. But How can I pass parameter from first VC to the third VC(Page View Controller) because I want to pass some index data of that parameter to the VC of Container View. Through debugging I saw third VC's View DidLoad never fired. Just Didload's of first VC and second VC fired. How can I solve this situation? Any help appreciated.
I found the answer.
When we add a container view it create an embedded segue between first VC and second VC. I just need to delete it and create this relation between first and third VC. So now it's what I wanted. I pass my parameter to the third VC(Page View Controller) through segue and from the third VC pass some index of data to the second VC.
Happy Coding!