Skip to content

Latest commit

History

History
60 lines (40 loc) 路 2.07 KB

File metadata and controls

60 lines (40 loc) 路 2.07 KB

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.