gpt4 book ai didi

ios - 如何让 Bottom Sheet 显示在 viewDidLoad() 上?

转载 作者:可可西里 更新时间:2023-11-01 00:39:11 28 4
gpt4 key购买 nike

我想要在 viewDidLoad() 上使用 Google map 的场景中显示底部工作表,但我在 material.io 网站上找到的唯一底部工作表示例被触发使用按钮。

如何使用 MDCBottomSheetController 实现此目的?

最佳答案

@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

关于ios - 如何让 Bottom Sheet 显示在 viewDidLoad() 上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50051711/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com