I'm trying to animate the transitions between tabs in my UITabBarController, which is working fine when I push on the tab buttons. However, when I switch tabs programmatically by calling
[self.tabBarController setSelectedIndex:2];
in a swipe gesture recognizer, the shouldSelectViewController function is NOT being called in my UITabBarControllerDelegate delegate, and therefore my animation isn't being triggered.
Is there a way to accomplish what I want? Can I programmatically trigger the tab switch differently perhaps so that the shouldSelectViewController function gets called?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…