I want a bottom sheet to show on a scene with Google map on viewDidLoad()
but the only bottom sheet example I found on the material.io
website gets triggered with a button.
How do I use MDCBottomSheetController
to achieve this?
@stone-cold See below-mentioned code.
import MaterialComponents.MaterialButtons
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let bottomSheet = MDCBottomSheetController(contentViewController: viewController)
// Present the bottom sheet
present(bottomSheet, animated: true, completion: nil)
}
}
See more details here https://github.com/material-components/material-components-ios/tree/develop/components/BottomSheet
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With