I have read Apple's design patterns
docs, and a few other guides and there are things I can not understand .
I encounter the problem of passing variables between viewControllers
, and I saw the delegate
option.
Than i have realize that if you go from viewControlA
to viewControlB
, and you need to update some mutableArray
from B to A , you can post a delegate from B and A will get it .
BUT, if A
can hear the delegate, that means that A is still alive after I went to B
.
I was thinking that only when you push
between views, the previous is still alive, but when the transition is modal
, the previous scene is actually dead .
What is the life cycle of each view controller class ? They are always alive ?