I don't get the delegate logic of UIViewController.
It has delegate method of
– viewWillAppear: – viewDidAppear: – viewWillDisappear: – viewDidDisappear:
So, every time, if a view of a viewcontroller appear or disappear, the according above methods inside the viewcontroller will be called?
I have two viewcontrollers. viewcontroller2's view (view2) is a sub view of viewcontroller1's view (view1).
if I set view2's alpha to 0, then this view2 will disappear. but – viewWillDisappear: and – viewDidDisappear: of viewcontroller2 are never called.
So what's the point please?
How should I use these methods to control the appear and disappear of a view?
Thanks