This is just a short note about a change I discovered between iPhone OS 2.x and 3.0. It’s not very interesting or exciting but I thought I’d record it in the off chance that it helps someone else.
When the user switches tabs on a UITabBarController in iPhone OS 2.x, the sequence of events is:
-
UIViewof new tab gets added as a subview -
UIViewof old tab gets removed - The delegate’s
tabBarController:didSelectViewController:method is called
Run the same code on iPhone OS 3.0, however, and the sequence is this:
-
UIViewof new tab gets added as a subview - The delegate’s
tabBarController:didSelectViewController:method is called -
UIViewof old tab gets removed (sometime later, I think it’s invoked via one ofNSObject‘sperformSelector:methods)
This is a inconsequential change for most, but it might make a difference if you are checking the UIViews’ superview variables in your tab bar controller delegate method.