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

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -