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

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -