💫 Elegant bottom sheet(modal) by swift
Explore the BottomSheet Demo or clone the repository.
pod 'JHBottomSheet', '~> 1.0.1'
dependencies: [
.package(url: "https://github.com/bazinga94/BottomSheet.git", .exact("1.0.1")),
],
Include the UIViewController to be presented in the BottomSheet initializer. After that, you can use it like presenting and dismissing UIViewController.
let bottomSheet = BottomSheet.init(childViewController: yourViewController, height: 500)
present(bottomSheet, animated: true, completion: nil)
If you adopt the BottomSheetFlexible protocol and want to present the bottom sheet as much as the size of the view, you don't need to include the height.
public protocol BottomSheetFlexible: AnyObject {
var bottomSheetContentView: UIView! { get set }
}
BottomSheet is released under a MIT License. See LICENSE file for details.