Skip to content

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

Notifications You must be signed in to change notification settings

rozd/DrawerController

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages