A Bottom Sheet component made in UIKit.
To add a package dependency to your Xcode project, select File > Swift Packages > Add Package Dependency and enter the repository URL:
https://github.com/gaetanomatonti/BottomSheet
Edit your Package.swift
file and add the repository URL to the dependencies.
dependencies: [
.package(url: "https://github.com/gaetanomatonti/BottomSheet", .upToNextMajor(from: "0.4.0"))
]
SheetTransitioningDelegate
Inside your view controller store a new instance of SheetTransitioningDelegate
. When presenting a new view controller you should set its modalPresentationStyle
to .custom
and its transitioningDelegate
to the SheetTransitioningDelegate
you stored.
func presentViewController() {
let viewController = UIViewController()
viewController.modalPresentationStyle = .custom
viewController.transitioningDelegate = sheetTransitioningDelegate
present(viewController, animated: true)
}
link |
Stars: 38 |
Last commit: 3 weeks ago |
SheetPresentationController
with interactive transition.SheetTransitioningDelegate
to allow sheet presentations.Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics