PullableSheet 0.1.0

PullableSheet 0.1.0

Maintained by Tatsuya Tanaka.



PullableSheet

Pullable sheet like a default map app or bottom sheets (Android).

Installation

Carthage

github "tattn/PullableSheet"

CocoaPods

pod 'PullableSheet'

Usage

import PullableSheet

// ....

override func viewDidLoad() {
    super.viewDidLoad()
    
    let content = UIViewController() // your view controller
    content.view.backgroundColor = .clear

    let sheet = PullableSheet(content: content)
    sheet.snapPoints = [.min, .custom(y: 300), .max] // snap points (if needed)
    sheet.add(to: self)
}

Customize top bar

let topBar = UIView(frame: .init(x: 0, y: 5, width: 300, height: 30))
topBar.backgroundColor = .green
let sheet = PullableSheet(content: content, topBarStyle: .custom(topBar))

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

PullableSheet is released under the MIT license. See LICENSE for details.