Giter Site home page Giter Site logo

topdrawer's Introduction

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.1'

Carthage

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

github "JUSTINMKAUFMAN/TopDrawer" "0.1.1"

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, [email protected]

License

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

topdrawer's People

Contributors

justinmkaufman avatar

Stargazers

Husnain Ali avatar MohsinAli avatar

Watchers

MohsinAli avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.