gpt4 book ai didi

iOS 6.0 : UISplitViewController Popover broken or design changed by Apple?

转载 作者:可可西里 更新时间:2023-11-01 05:31:06 26 4
gpt4 key购买 nike

我在 Xcode 4.5 和部署目标 5.1 中创建了一个包含主从模板的项目。请有人帮我解决以下 UISplitViewController 问题。

  1. 在纵向模式下,主视图从左侧淡入。它不像在 iOS 5.0 中使用的纵向模式那样显示为 Popover View 。请参阅所附图片。如何让master view成为popover?

  2. 有没有办法在 Landscap 模式下隐藏主视图?

谢谢。 popover in ios 6.0

popover till ios 5.0

最佳答案

这是自 5.1 以来的默认操作。来自 iOS 6 发行说明:

In iOS 5.1, the UISplitViewController class adopts the sliding presentation style when presenting the left view (previously seen only in Mail). This style is used when presentation is initiated either by the existing bar button item provided by the delegate methods or by a swipe gesture within the right view. No additional API adoption is required to obtain this behavior, and all existing APIs—including that of the UIPopoverController instance provided by the delegate—will continue to work as before.

If the gesture would be insupportable in your app, setting the presentsWithGesture property of your split view controller to NO disables the gesture. However, disabling the gesture is discouraged because its use preserves a consistent user experience across all apps.

有一个 dirty way解决这个问题。

关于iOS 6.0 : UISplitViewController Popover broken or design changed by Apple?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12670300/

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