【发布时间】:2018-10-28 18:44:01
【问题描述】:
单击下一个按钮(位于购物车视图中,由于显示的视图而在图像中隐藏),我正在模态显示一个视图。在 iPhone 中,它看起来像这样......
单击下一步按钮以模态方式呈现视图,这是编写的代码...
let vc = PresentedUserDetailsViewController()
vc.modalPresentationStyle = .custom
present(vc, animated: true, completion: nil)
在呈现的视图PresentedUserDetailsViewController 中,我初始化了以下内容...
let menuHeight = UIScreen.main.bounds.height / 2
init() {
super.init(nibName: nil, bundle: nil)
modalPresentationStyle = .custom
transitioningDelegate = self
}
但是当我在 iPad Air 2 模拟器中运行时,视图呈现如下......
应该怎样做才能使呈现的视图看起来像在 iPhone 中一样......?
【问题讨论】: