I am using the following codes to switch controller in my Three20 App
TTURLAction * urlAction = [TTURLAction actionWithURLPath:url];
[urlAction applyAnimated:YES];
CATransition * transition = [CATransition animation];
transition.duration = 0.4f;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionReveal;
transition.subtype = kCATransitionFromRight;
[self.navigationController.view.layer addAnimation:transition forKey:nil];
[[TTNavigator navigator] openURLAction:urlAction];
But the transition is strange and never as smooth as the default Three20 transition, e.g. Move from TTTableViewController to TTViewController
Any one can provide a better codes for a smoother transition?
Is it possible to transit only the content between NavigationController and TabBar? (I mean keep the button in existing NavigationController un-touched)
Thanks.
You are in fact animating twice. First you tell three20 to apply animation by
[urlAction applyAnimated:YES];
and then you are attaching your own animation.Remove applyAnimated: and it works just fine. Tested with Three20 1.0.11 on iOS5 Simulator and device.
It might be clever to use
[TTNavigator navigator].topController
instead ofself.navigationController
to get the controller which will present the url. This might be an different one under some circumstances.