UITabBarController timing change from OS 2.X to 3.0

June 29th, 2009 § 1 comment § permalink

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:

  1. UIView of new tab gets added as a subview
  2. UIView of old tab gets removed
  3. The delegate’s tabBarController:didSelectViewController: method is called

Run the same code on iPhone OS 3.0, however, and the sequence is this:

  1. UIView of new tab gets added as a subview
  2. The delegate’s tabBarController:didSelectViewController: method is called
  3. UIView of old tab gets removed (sometime later, I think it’s invoked via one of NSObject‘s performSelector: 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.

Where Am I?

You are currently browsing entries tagged with UIKit at bunnyhero dev.