There is no magic solution here. The correct solution is to manually send these messages.
The viewWillAppear:/viewDidAppear: and viewWillDisappear:/viewDidDisappear: messages are the only messages you need to manually send to the child view controller.
You should implement all four of these methods in the parent view controller and send the same message to the child view controller whenever the parent receives the message and the child is loaded.
In addition, when you add the child view controller's view, you should send the viewWillAppear:/viewDidAppear: messages if the parent's view.window is non-nil. When you remove the view, you should send the viewWillDisappear:/viewDidDisappear: messages if the parent's view.window is non-nil.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…