0
votes

the following code yield a standard animation when user selects between tabs on sdk2.0 through 2.2, on sdk3.0 devices it does not. I'm still compiling against 2.0 or 2.2 sdk but running on a device that runs 3.0 version of the OS. descrepcincies code:

- (void)tabBarController:(UITabBarController *)controller didSelectViewController:(UIViewController *)viewController
{
    [UIView beginAnimations:@"someAnimation" context:nil];
    [UIView setAnimationDuration:1.0];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:[[viewController view] superview] cache:YES];
    [UIView commitAnimations];
}

anyone knows how to accomplish this in 3.0? thanx! --tzurs

1

1 Answers

1
votes

Probably what is happening is the wrong view is animating. Try animating the tab controller itself:

- (void)tabBarController:(UITabBarController *)controller didSelectViewController:(UIViewController *)viewController
{
    [UIView beginAnimations:@"someAnimation" context:nil];
    [UIView setAnimationDuration:1.0f];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:[controller view] cache:YES];
    [UIView commitAnimations];
}

And then possibly trying to find the proper subview from there.