I have used revealviewcontroller in which I take a view controller and set its sw_front to a tabbar controller and sw_rear to tableview controller. when I am running , its working fine . In tabbar controller I have added 5 different view controllers and same items in tableview cells also dynamically in sw_rear part. In table view for each cell i have connected the dynamic cells to its related view controller based on its indexpath.row . But when i click on it the tabbar items is not coming . the navigation items are coming because before every view controller i have embed the navigation controller. why the tabbar items are not coming???
For better understanding I am sending few codes and screens
codes
I have set the tableview like this for each dynamic cell
switch(indexPath.row)
{
case 0 :
print("1st row")
//self.performSegueWithIdentifier("segueIdentifier", sender: self)
let mainStoryboard = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle())
let vc : UINavigationController = mainStoryboard.instantiateViewControllerWithIdentifier("homeVC") as! UINavigationController
self.presentViewController(vc, animated: true, completion: nil)
case 1 :
print("2nd row")
let mainStoryboard = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle())
let vc : UINavigationController = mainStoryboard.instantiateViewControllerWithIdentifier("menuVC") as! UINavigationController
self.presentViewController(vc, animated: true, completion: nil)
But when i click on ,it goes to view controller but tabbar items not coming
screens
This screen is the first view .Here you can see the tabor items are coming .Now clicking on slide menu the screen is
the dynamic data is coming . now clicking on for example home the screen shows like this
here no tabbar items are there and the sliding menu button is not working . where i am doing mistake??
Below is the code for setting reveal view controller on slide menu button:
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
if self.revealViewController() != nil{
slideBtn.target = self.revealViewController()
slideBtn.action = #selector(SWRevealViewController.revealToggle(_:))
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
}
}