Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 992 Bytes

README.md

File metadata and controls

39 lines (26 loc) · 992 Bytes

DrawerController

A container view controller that supports main view controller in the center and drawers around it.

Installation

Swift Package Manager

Add DrawerController as a dependency of your project in Package.swift file:

dependencies: [
  .package(url: "https://github.com/rozd/DrawerController.git", .branch("master"))
]

Interface Builder Integration

Embed root and bottom view controllers using custom segues:

Usage

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)
}