Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tattn/PullableSheet

Pullable sheet like a default map app or bottom sheets (Android).
https://github.com/tattn/PullableSheet

bottomsheet ios swift

Last synced: 3 months ago
JSON representation

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

Awesome Lists containing this project

README

        



PullableSheet is like a sheet in a default map app or Android's bottom sheets.



Carthage compatible


CocoaPods


Platform


Swift Version


license:MIT



# Installation

## Carthage

```ruby
github "tattn/PullableSheet"
```

## CocoaPods

```ruby
pod 'PullableSheet'
```

# Usage

```swift
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

```swift
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.