CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

DAOBottomSheet 1.3.1

DAOBottomSheet 1.3.1

Maintained by daoseng33.



  • By
  • daoseng33

DAOBottomSheet

Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Overview

BottomSheetDemo.mov

bottom-sheet-relationships

Usage

Hold bottom sheet as a local reference.

var bottomSheet: DAOBottomSheet?

Create bottom sheet via DAOBottomSheet/init(parentVC:title:type:).

bottomSheet = DAOBottomSheet(parentVC: self, title: "Title", type: .flexible)
bottomSheet?.rootVC.delegate = self
bottomSheet?.show()

Simply add your custom view via delegation function DAOBottomSheetDelegate/setupDAOBottomSheetContentUI(bottomSheet:).

func setupDAOBottomSheetContentUI(bottomSheet: DAOBottomSheetViewController) -> UIView? {
    let view = UIView()
    
    contentView.addSubview(view)

    view.snp.makeConstraints {
        $0.height.equalTo(200)
    }

    return view
}

If you have a custom scroll view(or table view, collection view, etc), implement DAOBottomSheetDelegate/setupCustomContentScrollView(bottomSheet:) instead.

func setupCustomContentScrollView(bottomSheet: DAOBottomSheetViewController) -> UIScrollView? {
    return <#YourCustomScrollableView#>
}

Requirements

  • Swift 5.0
  • iOS 15+

Installation

DAOBottomSheet is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'DAOBottomSheet'

Author

daoseng33, [email protected]

License

DAOBottomSheet is available under the MIT license. See the LICENSE file for more info.