recently using Container view to create your own child controller in the main view controller, but encountered a problem, do not know how to use the code to get the view included with the controller view Controller.
I want to get the view controller that comes with it, set the agent in the inside, then implement the proxy method in the main view controller, find a lot of information, the solution is as follows.
Set up an. h and. m file to associate the view Controller that came with the container view, setting the proxy inside.
- Click Segue, set Identifier
- Inheriting methods in the main view controller
-(void) Prepareforsegue: (Uistoryboardsegue *) Segue Sender: (ID) sender
implement the following code.
This allows you to get the controller of the view controller that segue jumps to, and then set the proxy for it to call each other.