ios - Open a new TabBarController on clicking a tableview cell in swift -


i novice swift, how can open new tabbarcontroller on clicking tableviewcell. awaiting responses

you have number of solutions: 1) if you're using storyboards, control+drag cell tabbarcontroller. 2) if want code , you're using uinavigationcontroller try push nav:

let vc1 = self.storyboard!.instantiateviewcontrollerwithidentifier("myviewcontroller") as! viewcontroller self.navigationcontroller!.pushviewcontroller(vc1, animated: true) 

3) if don't have uinavigationcontroller can present vc this:

let vc1 = viewcontroller() //change class name self.presentviewcontroller(vc1, animated: true, completion: nil) 

4) if you're using nibs (previous minor change):

viewcontroller(nibnameornil: nil, bundleornil: nil) 

if want more resources, can check out link here


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -