【问题标题】:iOS - How can I present a full screen controller in iPad as same as iPhone does having curved both the screen presented and behind the presented? [closed]iOS - 如何在 iPad 中呈现全屏控制器,就像 iPhone 一样,同时弯曲屏幕呈现和呈现的背后? [关闭]
【发布时间】:2021-12-01 14:42:27
【问题描述】:

我附上了参考图片。我想知道 1 或 2 条魔法线。我尝试了很多不同风格的方法,但都无法实现。

如下图所示,iPad 右侧屏幕呈现弯曲的屏幕,后屏幕向上移动。

【问题讨论】:

  • "在 iOS 13.0 或更高版本中与 iPhone 相同"?这意味着什么? iOS 13 在 iPhone 上运行。您的意思是在 iOS ≥13 中,与在 iOS 版本
  • @DuncanC 我已经更新了问题,你能看看吗?

标签: ios swift presentmodalviewcontroller presentviewcontroller


【解决方案1】:

如果我正确理解了您的问题,您希望显示所呈现的 viewcontroller,以便 viewcontroller 在呈现 viewcontroller 时应采用全屏尺寸。

如果这是要求,那么您可以将呈现viewcontrollermodalPresentationStyle 设置为.fullScreen 以实现此目的

代码:

    let secondVC = SecondViewController()
    secondVC.modalPresentationStyle = .fullScreen
    self.present(secondVC, animated: true) {
        
    }

【讨论】:

  • Janmenjaya 如图所示,请看右侧图像,它的顶部弯曲,屏幕后面的控制器随着顶部弯曲向前移动。我需要同样的外观。感谢您的回复。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-04-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多