Glass 0.0.4

Glass 0.0.4

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Sep 2016
SPMSupports SPM

Maintained by Comyar Zaheri.



Glass 0.0.4

  • By
  • Comyar Zaheri

Overview

Glass is a gesture-based, layered window manager that allows you to create interfaces similar to those found in Facebook Paper. Glass uses UIKit Dynamics in order to create beautiful, physics-based animations that allow your interfaces to feel natural.

Glass comes built-in with hooks, callbacks, and configuration options that allow you to customize your interfaces exactly to your liking. However, if something is missing don’t hesitate to open an issue or even create a pull request!

See It In Action

Usage

Using Glass

Pushing a Window
import Glass

let rootViewController = UIViewController()

/// Offsetable windows can't be dragged off the screen by a user's pan gesture
/// Dismissable windows can be dragged off the screen by a pan gesture to be dismissed
WindowManager.shared.pushWindow(rootViewController, type: .Offsetable)
Controlling When Users Can Pan a Window
import Glass

let rootViewController = UIViewController()
WindowManager.shared.pushWindow(rootViewController, type: .Dismissable, style: .None, 
    gesturePredicate: { (rootViewController: UIViewController, type: WindowType) -> (Bool) in
        // Check app state, perform magic computations, etc. here
        return true
      })

Requirements

  • iOS 8.0 or higher

License

Glass is available under the MIT License.

Contributors