【发布时间】:2019-06-19 13:58:41
【问题描述】:
我正在使用 MDCBottomSheetController
以下是我展示底部表单控制器的代码
let bottomSheet: MDCBottomSheetController = MDCBottomSheetController(contentViewController: viewController)
// Present the bottom sheet
bottomSheet.shouldFlashScrollIndicatorsOnAppearance = true;
if openFor == SearchBottomSheetViewController.OPEN_FOR_DATE {
bottomSheet.preferredContentSize = CGSize(width: self.view.frame.size.width, height: self.view.frame.size.height * 0.3)
}else {
bottomSheet.preferredContentSize = CGSize(width: self.view.frame.size.width, height: 3 * self.view.frame.size.height / 4)
}
// bottomSheet.dismiss(animated: <#T##Bool#>, completion: <#T##(() -> Void)?##(() -> Void)?##() -> Void#>)
present(bottomSheet, animated: true, completion: nil)
当显示软键盘时,底部表单 ui 被向上推我不希望在显示键盘时 UI 被向上推
请参阅下面的 gif 以了解问题
【问题讨论】:
-
我遇到了同样的问题,请同行评审我的编辑,我添加了 material-component-ios 标签,以便那里的人可以找到它并可能提供答案。
-
在 github 上也已批准报告的问题,请在此处添加评论以及链接github.com/material-components/material-components-ios-codelabs/…
标签: ios swift bottom-sheet ios-keyboard-extension material-components-ios