Skip to content
A top drawer that can be pulled up/down over the screen
Swift Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example Release 0.1.2 Jul 26, 2019
TopDrawer Release 0.1.3 Jul 26, 2019
.gitignore Add template Jul 25, 2019
LICENSE
README.md Release 0.1.3 Jul 26, 2019
TopDrawer.gif
TopDrawer.podspec Release 0.1.3 Jul 26, 2019
_Pods.xcodeproj Initial commit Jul 25, 2019

README.md

TopDrawer

Version License Platform

A top drawer that can be pulled up/down over the screen, written in Swift.

Features

  • Drawer visibility can be toggled on/off
  • Stays on top of the visible hierarchy
  • Does not prevent interaction with content underneath the drawer (as is the case with modal drawers)

Installation

Cocoapods

TopDrawer is available through CocoaPods. To install it, add the following to your Podfile:

pod 'TopDrawer', '~> 0.1.3'

Carthage

To install via Carthage, add the following to your Cartfile:

github "JUSTINMKAUFMAN/TopDrawer" "0.1.3"

Usage

The top drawer can be added to any UIViewController simply by initializing an instance of TopDrawer and adding it as a subview. For example:

class ViewController: UIViewController {
    let topDrawer = TopDrawer()

    init() {
        super.init(nibName: nil, bundle: nil)
        view.addSubview(topDrawer)
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}

Note that you should not add your own auto-layout constraints to TopDrawer (layout is handled internally by adjusting the frame position/visibility).

See the sample project for a basic implementation.

Author

Justin Kaufman, jmkauf@gmail.com

License

TopDrawer is available under the MIT license. See the LICENSE file for more info.

You can’t perform that action at this time.