I have an application where I’m trying to pass a UIScrollView from one UIViewController to the next during a navigation transition. I’m trying to figure out in which methods I should make remove the UIScrollView from its superview and then attach it to the new UIViewController.
I did an NSLog in the viewDiDisappear / viewWillDisappear methods of the first UIViewController and the viewDidAppear / viewWillAppear methods of the second UIViewController and this is the order I got:
viewWillDisappear
viewWillAppear
viewDidDisappear
viewDidAppear
My question is, can I expect this to stay consistent for all transitions, or do these run on different threads and based on load times of certain things, can they vary?
EDIT: Bump
Actually, when you try to add a view as a subview, and it already has a superview, it will be removed from its original superview before being added to the new superview (as per the docs: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIView_Class/UIView/UIView.html)… so don’t really even have to worry about this as much as I thought.