Read the article on Medium for betting understanding of how it works under the hood
Bottom Sheet component is designed to handle any content, including a scrolling one.
UICollectionView, UITableView or UIScrollViewBottomSheetNavigationController
| Adapts to content size | Interactive dismissal |
|---|---|
![]() |
|
| Push and pop transitions | Interactive pop transition |
|---|---|
![]() |
![]() |
To integrate Bottom Sheet into your Xcode project using Swift Package Manager, add it to the dependencies value of your Package.swift:
dependencies: [
.package(url: “https://github.com/joomcode/BottomSheet”, from: “2.0.0”)
]
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ bundle install
To integrate BottomSheet into your Xcode project using CocoaPods, specify it in your Podfile:
source ‘https://github.com/CocoaPods/Specs.git’
use_frameworks!
target ‘<Your Target Name>’ do
pod ‘BottomSheet’, :git => ‘https://github.com/joomcode/BottomSheet’
end
This repo contains demo, which can be a great start for understanding Bottom Sheet usage, but here are simple steps to follow:
UIViewController to present and set content’s size by preferredContentSize propertyIf you want to build flows, use BottomSheetNavigationController
presentBottomSheetInsideNavigationController(
viewController: viewControllerToPresent,
configuration: .default
)
You can customize appearance passing configuration parameter
presentBottomSheet(
viewController: viewControllerToPresent,
configuration: BottomSheetConfiguration(
cornerRadius: 10,
pullBarConfiguration: .visible(.init(height: 20)),
shadowConfiguration: .init(backgroundColor: UIColor.black.withAlphaComponent(0.6))
),
canBeDismissed: {
// return `true` or `false` based on your business logic
true
},
dismissCompletion: {
// handle dismiss completion if user closed bottom sheet by a gesture
}
)
Read the article on Medium for betting understanding of how it works under the hood
This package provides you with an easy way to show tooltips over any SwiftUI view, since Apple does not provide ...
SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or ...
Create Toast Views with Minimal Effort in SwiftUI Using SSToastMessage. SSToastMessage enables you to effortlessly add toast notifications, alerts, and ...