views:

28

answers:

1

didSelectViewController is not being fired when selectedIndex is set programmatically on UITabBarController object, when tapping manually everything works fine.

A: 

From my current work, it seems selectedIndex is updated only if the tabbed view hasn't been loaded before - perhaps the same applies to the responder chain "the other way around".

You might have more luck by switching tabs using selectedItem, at least I can identify the correct tab in the viewWillAppear in a tab's viewcontroller using the Item, but not the Index.

For you, the most obvious "fix" would be to also invoke didSelectViewController in every piece of code that changes the Index.

Henrik Erlandsson