I am novice to Swift, how can open a new TabBarController on clicking a tableviewcell. Awaiting for your responses
Asked
Active
Viewed 808 times
0
-
IF you are using storyboards just drag & drop a segue from the cell it self to the newly created TabBarController. – Slavcho Mar 17 '16 at 11:14
1 Answers
1
You have number of good solutions:
1) If you're using storyboards, then control+drag from the cell to your TabBarController
.
2) If you want to do it with code and you're using UINavigationController
try to do this with push to Nav:
let VC1 = self.storyboard!.instantiateViewControllerWithIdentifier("MyViewController") as! ViewController
self.navigationController!.pushViewController(VC1, animated: true)
3) If you don't have UINavigationController
you can just present the VC like this:
let VC1 = ViewController() //change this to your class name
self.presentViewController(VC1, animated: true, completion: nil)
4) If you're using Nibs (previous with this minor change):
ViewController(nibNameOrNil: nil, bundleOrNil: nil)
If you want more resources, you can check out this link here

Community
- 1
- 1

Dragos Strugar
- 1,314
- 3
- 12
- 30