Skip to content

bazinga94/BottomSheet

Repository files navigation

BottomSheet

Swift Swift Package Manager CocoaPods Version License Platforms Swift Version

💫 Elegant bottom sheet(modal) by swift

Try it

Explore the BottomSheet Demo or clone the repository.

Installation

Swift Package Manager

pod 'JHBottomSheet', '~> 1.0.1'
dependencies: [
  .package(url: "https://github.com/bazinga94/BottomSheet.git", .exact("1.0.1")),
],

Usage

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 }
}

Authors

Jongho Lee

License

BottomSheet is released under a MIT License. See LICENSE file for details.

About

Elegant bottom sheet(modal) by swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published