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

https://github.com/donggyushin/dgbottomsheet

The lightest swift bottom sheet library
https://github.com/donggyushin/dgbottomsheet

bottomsheet ios swift

Last synced: 4 months ago
JSON representation

The lightest swift bottom sheet library

Awesome Lists containing this project

README

          

1. [DGBottomSheet](#DGBottomSheet)
2. [Requirements](#Requirements)
3. [Installation](#Installation)
4. [Usage](#Usage)

# DGBottomSheet
The lightest swift bottom sheet library



## Requirements
- iOS 12.0+
- Swift 5.5+
- Xcode 10.0+

## Installation

### SPM
```
File > Add Packages > https://github.com/donggyushin/DGBottomSheet
```

### CocoaPod
```
pod 'DGBottomSheet', :git => 'https://github.com/donggyushin/DGBottomSheet.git'
```

## Usage
```
func showBottomSheet() {
let contentsView: UIView = {
let view = UIView()
view.translatesAutoresizingMaskIntoConstraints = false
// You should give view height constraint anyway
view.heightAnchor.constraint(equalToConstant: 300).isActive = true
view.backgroundColor = .white
return view
}()
let vc = DGBottomSheet(view: contentsView)
// Make sure animated false
self.present(vc, animated: false)
}

// You can also hide DGBottomSheet programmatically
let vc = DGBottomSheet(view: contentsView)
vc.hide()
```