2016-05-27 12 views
0

Ich habe ein Storyboard mit wenigen UINavigationControllers und UIViewControllers.Zeige UINavigationController mit UIViewController Animation

Main.storyboard

Wenn ich performSegueWithIdentifier(..) vom zweiten zum dritten Fenster Standardanimation rechts nach links Rutsche ist. Aber wenn ich performSegueWithIdentifier(..) aus dem dritten Fenster zu UINavigationController die Animation ist von unten nach oben Folie. Wie setzt man UIViewController ->UINavigationController Animation auf eine wie UIViewController ->UIViewController?

+0

wenn Sie aktuelle Viewcontroller benötigen? –

Antwort

0
YOURVC *vc = [[YOURVC alloc]init]; 
UINavigationController *VCNavigation = [[UINavigationController alloc]initWithRootViewController:vc]; 

Und wenn man von 1 bis 3 oder einem Anruf

[self.navigationController pushViewController:vc animated:YES]; 

oder 2 bis 1 auch fordern Sie wie folgt aufrufen können und stattdessen können Sie

[self.navigationController popViewControllerAnimated:YES]; 

nennen oder zur root view controller Verwendung

[self.navigationController popToRootViewControllerAnimated:YES]; 

oder auf einen bestimmten vc

[self.navigationController popToViewController:yourvc Animated:YES]; 

Dann, wenn Sie Navigation zeigen wollen, halten Sie es, oder wenn Sie Sie kann es ausblenden möchten verbergen.

+0

Ich weiß, wie man zwischen den Controllern navigiert, aber wird das Animationsproblem behoben? – Roo

+0

ja durch Navigation wird es nach links animieren, wenn Sie die presentViewController-Methode verwenden, wird es von unten nach oben kommen. – Santo