gpt4 book ai didi

ios - 如何检查 View Controller 在 iOS 中是处于窥视模式 [3d touch] 还是全屏模式

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:01:00 26 4
gpt4 key购买 nike

细节 View Controller 支持窥视模式。当我们以 peek 模式显示详细 Controller 时,我们需要禁用详细 Controller 中的工具提示/教程。我们如何确定 View Controller 是以速览模式还是全屏模式显示的?

最佳答案

有一种不完美但实用的方法可以做到这一点。在许多情况下,仅使用 UINavigationController 和/或 UITabBarController 除了 peek 模式。您可以通过此识别 peek 模式。

let isPeeking = navigationController == nil
// or
let isPeeking = tabBarController == nil

关于ios - 如何检查 View Controller 在 iOS 中是处于窥视模式 [3d touch] 还是全屏模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33839752/

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