【发布时间】:2018-10-07 16:02:14
【问题描述】:
我希望在 viewDidLoad() 上使用 Google 地图的场景中显示底部表,但我在 material.io 网站上找到的唯一底部表示例是通过按钮触发的。
如何使用MDCBottomSheetController 实现这个?
【问题讨论】:
标签: ios swift material-components-ios
我希望在 viewDidLoad() 上使用 Google 地图的场景中显示底部表,但我在 material.io 网站上找到的唯一底部表示例是通过按钮触发的。
如何使用MDCBottomSheetController 实现这个?
【问题讨论】:
标签: ios swift material-components-ios
@stone-cold 请参阅下面提到的代码。
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)
}
}
在此处查看更多详细信息https://github.com/material-components/material-components-ios/tree/develop/components/BottomSheet
【讨论】: