ios - How can I push the next view controller on a navigation controller programmatically? -


how can push next view controller on navigation controller programmatically (without need of button)?

i know how instantiate , present new controller below

 var next = self.storyboard?.instantiateviewcontrollerwithidentifier("placeinfo") as! placeinfocontroller           self.presentviewcontroller(next, animated: false, completion: nil) 

but want push next view controller on navigation controller. tried below self.navigationcontroller?.pushviewcontroller() no success

 var next = self.storyboard?.instantiateviewcontrollerwithidentifier("placeinfo") as! placeinfocontroller  self.navigationcontroller?.pushviewcontroller(next, animated: true) 

have tried using performseguewithidentifier?

learn more here:

https://developer.apple.com/library/mac/documentation/appkit/reference/nssegueperforming_protocol/#//apple_ref/occ/intfm/nssegueperforming/performseguewithidentifier:sender:


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -