Latest 0.1.1
License MIT
Platforms osx 10.11, requires ARC
Frameworks Cocoa

CocoaPods license MIT Carthage compatible


  • Written in Swift.
  • Auto layout based.
  • Supports both layer backed and non-layer backed views.
  • Supports instantiation via storyboards.
  • Still a work in progress so new features are coming very soon. Contributions are welcome.



github "glenmax-ltd/GLXMacDrawerController"
to your Cartfile.


pod 'GLXMacDrawerController'
to your Podfile.


Drag GLXMacDrawerController.swift into your Xcode project.



Step 1

Add 3 new NSViewController scenes to your storyboard.

Step 2

Change the class of the first view controller to GLXMacDrawerController

Step 3

Ctrl-drag from the GLXMacDrawerController to the other two view controllers (one at a time). When prompted, select ‘Custom’ for the segue type.

Step 4

Now select the created segues and ensure that they have an identifier of "center_controller" for the center controller and "left_controller" for the left controller.

That’s it! You are now good to go ;)


If you prefer to instantiate a drawer controller yourself you can use a convenience initialiser init(leftController:,centerController:). Alternatively, you can use any other NSViewController initialisers and then set left and center view controllers yourself.


Drawer controller adds a computed property to the NSViewController which lets you access it.

To open a drawer call self.drawer?.open(animated:). To close it call self.drawer?.close(animated:).

By default sibling NSViews are transparent and expose the contents of the views behind them. This is clearly not a desired behaviour. To prevent it, center view controller is placed inside of NSBox. Its background color can be changed via the self.drawer?.centerViewBackgroundColor property.

Latest podspec

    "name": "GLXMacDrawerController",
    "version": "0.1.1",
    "summary": "Custom drawer controller for macOS 10.11 and above.",
    "description": "Written in Swift.nSupports both layer backed and non-layer backed views.nSupports instantiation via storyboards.nStill a work in progress so new features are coming very soon. Contributions are welcome.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": ""
    "authors": {
        "Glenmax": "[email protected]"
    "platforms": {
        "osx": "10.11"
    "source": {
        "git": "",
        "branch": "master",
        "tag": "v0.1.1"
    "source_files": "GLXMacDrawerController/*.swift",
    "requires_arc": true,
    "frameworks": "Cocoa",
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3"
    "pushed_with_swift_version": "3"

Pin It on Pinterest

Share This