https://github.com/iosdevgarg/containerview-tabbar
Integration of TabBar Controller in a ContainerView
https://github.com/iosdevgarg/containerview-tabbar
containerview tabbar tabbarcontroller toolbar toolbar-button uiviewcontroller
Last synced: 3 months ago
JSON representation
Integration of TabBar Controller in a ContainerView
- Host: GitHub
- URL: https://github.com/iosdevgarg/containerview-tabbar
- Owner: iOSDevGarg
- Created: 2018-01-23T04:40:21.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-11T05:11:53.000Z (over 7 years ago)
- Last Synced: 2024-11-06T07:28:43.859Z (about 1 year ago)
- Topics: containerview, tabbar, tabbarcontroller, toolbar, toolbar-button, uiviewcontroller
- Language: Swift
- Size: 84 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ContainerView-TabBar
This Project Helps in integration of conatiner View , Multiple View Controllers, toolBar And Tabbar Controller That can switch between multiple Tabs
# Flow
-----> 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
# Reference to Tabbar Controller
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
}()
# Adding Tabbar in container View
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)
}
# Expected Output : Basic Output

# When Clicked on Buttons In ToolBar Added - Output
