A container view controller that supports main view controller in the center and drawers around it.
Add DrawerController as a dependency of your project in Package.swift file:
dependencies: [
.package(url: "https://github.com/rozd/DrawerController.git", .branch("master"))
]
Embed root and bottom view controllers using custom segues:
Register drawers in the code:
let drawers = DrawerController()
drawers.rootViewController = mainController
drawers.bottomViewController = bottomController
To open bottom drawer programmatically call the openBottomViewController(animated:)
method:
@IBAction func openBottomDrawerButtonTapped(_ sender: Any) {
self.drawerController?.openBottomViewController(animated: true)
}