This Project Helps in integration of conatiner View , Multiple View Controllers, toolBar And Tabbar Controller That can switch between multiple Tabs
-----> Main View Controller
---> Up Bar
---> Bottom ToolBar
---> Three Buttons
---> ContainerView
---> Tab Bar Controller
---> Second Vc on Click of Second Button
---> Third Vc on Click of Third Button
private lazy var FirstObject: mainTabController =
{
// Instantiate View Controller
let viewController = self.storyboard?.instantiateViewController(withIdentifier: "mainTabController") as! mainTabController
// Add View Controller as Child View Controller
self.addChildViewController(viewController)
return viewController
}()
private func add(asChildViewController viewController: UIViewController)
{
// Configure Child View
viewController.view.frame = CGRect(x: 0, y: 0, width: self.firstContainer.frame.size.width, height: self.firstContainer.frame.size.height)
// Add Child View Controller
addChildViewController(viewController)
viewController.view.translatesAutoresizingMaskIntoConstraints = true
// Add Child View as Subview
firstContainer.addSubview(viewController.view)
// Notify Child View Controller
viewController.didMove(toParentViewController: self)
}