Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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).
- Host: GitHub
- URL: https://github.com/tattn/PullableSheet
- Owner: tattn
- License: mit
- Created: 2018-07-25T15:48:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-14T11:55:56.000Z (about 5 years ago)
- Last Synced: 2024-05-02T01:47:02.960Z (6 months ago)
- Topics: bottomsheet, ios, swift
- Language: Swift
- Homepage:
- Size: 2.14 MB
- Stars: 68
- Watchers: 5
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-cocoa - PullableSheet
README
PullableSheet is like a sheet in a default map app or Android's bottom sheets.
# 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 = .clearlet 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.