Skip to content

Commit 9e58dcd

Browse files
committed
Update README.md
1 parent 5f7e1ae commit 9e58dcd

1 file changed

Lines changed: 31 additions & 4 deletions

File tree

README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,44 @@
11
# Bottom Sheet
22

3-
Bottom Sheet component is widely used in Joom application
3+
Bottom Sheet component is designed to handle any content, including a scrolling one.
4+
- ✅ use any content size, and it will adapt
5+
- ✅ use scrollable content: `UICollectionView`, `UITableView` or `UIScrollView`
6+
- ✅ dismiss interactively by swipe-down or just tapping on an empty space
7+
- ✅ build flows inside using `BottomSheetNavigationController`
8+
- ✅ supports all system transitions: push and (interactive) pop
9+
- ✅ transition animated between different content sizes
10+
11+
## How it looks like
12+
13+
| Adapts to content size | Interactive dismissal |
14+
| - | - |
15+
| ![adapt-to-content-size](https://user-images.githubusercontent.com/52037202/164746215-64b61eb3-5813-483f-b639-d730e1cbec8c.gif) | ![interactive-dismissal](https://user-images.githubusercontent.com/52037202/164746241-2fa6ec19-eaae-4fcc-9036-9119df68da54.gif) |
16+
17+
### NavigationController inside Bottom Sheet
18+
19+
| Push and pop transitions | Interactive pop transition |
20+
| - | - |
21+
| ![system-push-pop](https://user-images.githubusercontent.com/52037202/164747115-cddbe4fb-403f-4333-994b-64545a7f9a28.gif) | ![interactive-pop](https://user-images.githubusercontent.com/52037202/164746311-74f0c872-3255-4ae5-b895-8c96d7cffb2c.gif) |
422

523
## Installation
624

725
### Swift Package Manager
826

9-
[Swift Package Manager](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
10-
1127
To integrate Bottom Sheet into your Xcode project using Swift Package Manager, add it to the dependencies value of your `Package.swift`:
1228

1329
```swift
1430
dependencies: [
15-
.package(url: "https://github.com/SnapKit/SnapKit.git", .branch("main"))
31+
.package(url: "https://github.com/joomcode/BottomSheet", from: "1.0.0")
1632
]
1733
```
34+
35+
## Getting started
36+
37+
This repo contains [demo](https://github.com/joomcode/BottomSheet/tree/main/BottomSheetDemo), which can be a great start for understanding Bottom Sheet usage, but here are simple steps to follow:
38+
1. Set content's size using [preferredContentSize](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621476-preferredcontentsize)
39+
2. (optional) Conform to `ScrollableBottomSheetPresentedController` if your view controller is list-based
40+
3. Present using custom transition `BottomSheetTransitioningDelegate`
41+
42+
## Resources
43+
44+
Read the [article on Medium](https://medium.com/me/stats/post/400515255829) for betting understanding of how it works under the hood

0 commit comments

Comments
 (0)