ios - how to push programmatically made view controller with swift 3 -


i have created tableviewcontroller , embedded in navigationcontroller (no storyboards):

class editfullnamenavigationcontroller: uinavigationcontroller {  override func viewdidload() {     super.viewdidload()     self.settoolbarhidden(false, animated: true) }  override init(rootviewcontroller: uiviewcontroller) {      let editfullnametableviewcontrollerclass = editfullnametableviewcontroller(style: .grouped)      super.init(rootviewcontroller: editfullnametableviewcontrollerclass)  }  required init?(coder adecoder: nscoder) {     fatalerror("init(coder:) has not been implemented") }  override init(nibname nibnameornil: string?, bundle nibbundleornil: bundle?) {     super.init(nibname: nibnameornil, bundle: nibbundleornil) }  }  class editfullnametableviewcontroller: uitableviewcontroller, uitextfielddelegate {  } 

i want push editfullnametableviewcontroller touching button in viewcontroller using :

let editfullnamenavigationcontrollerpage = editfullnamenavigationcontroller(rootviewcontroller: editfullnametableviewcontroller(style: .grouped)) self.navigationcontroller?.pushviewcontroller(editfullnamenavigationcontrollerpage, animated: true) 

but not working. how can this? thanks.

just create instance view controller , push viewcontroller

let controller = editfullnametableviewcontroller() self.navigationcontroller?.pushviewcontroller(controller, animated: true) 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -