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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -