/ / Melhor transição de NavigationController em Three20 usando TTURLAction - iphone, object-c, ios, xcode, three20

Melhor transição do NavigationController em Three20 usando TTURLAction - iphone, object-c, ios, xcode, three20

Eu estou usando os seguintes códigos para mudar de controlador no meu aplicativo Three20

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];

Mas a transição é estranha e nunca tão suave quanto a transição padrão Three20, por exemplo. Mover do TTTableViewController para o TTViewController

  1. Qualquer um pode fornecer códigos melhores para uma transição mais suave?

  2. É possível transitar apenas o conteúdo entre o NavigationController e o TabBar? (Quero dizer, mantenha o botão no NavigationController existente sem tocar)

Obrigado.

Respostas:

0 para resposta № 1

Você está de fato animando duas vezes. Primeiro você diz a três20 para aplicar animação [urlAction applyAnimated:YES]; e então você está anexando sua própria animação.

Remover applyAnimated: e funciona muito bem. Testado com o Three20 1.0.11 no iOS5 Simulator e dispositivo.

Pode ser inteligente usar [TTNavigator navigator].topController ao invés de self.navigationController para obter o controlador que apresentará o URL. Isso pode ser diferente em algumas circunstâncias.