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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

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

c# - Search and Add Comment with OpenXML for Word -