Pax

master

iOS Drawer/SideMenu/HamburgerMenu
synesthesia-it/Pax

Pax

Pax is a side-menu controller (or "drawer", hence the very "swedish" name) for those menus coming out from the side of the screen.

gif

Key features

  • Left and/or right menu with both pan gesture and open/close animations
  • Custom transition for central (main) view controller during animations and interactions
  • Compatible with storyboards and xibs
  • Custom widths for side menus
  • Single file design: integrate with package managers or simply drag and drop in your project

Default Usage

let storyboard = UIStoryboard(name: "Main", bundle: nil)
let paxController = Pax()
//A storyboard-instantiated view controller for left side
let left = storyboard.instantiateViewController(withIdentifier: "left")
left.view.backgroundColor = .yellow
//A code-instantiated green view controller for right side
let right = UIViewController()
right.view.backgroundColor = .green
//Main "center" view controller
let center = storyboard.instantiateViewController(withIdentifier: "navigationController")

//CustomWidth for both left and right side menus
left.pax.menuWidth = UIScreen.main.bounds.width * 0.8
right.pax.menuWidth = UIScreen.main.bounds.width * 0.6
paxController.setViewController(left, at: .left)
paxController.setViewController(right, at: .right)
paxController.setMainViewController(center)

Description

  • Swift Tools 5.1.0
View More Packages from this Author

Dependencies

  • None
Last updated: Tue Nov 08 2022 06:49:13 GMT-0500 (GMT-05:00)