iOS 6.0:UISplitViewController Popover破坏或Apple改变了设计? [英] iOS 6.0: UISplitViewController Popover broken or design changed by Apple?

查看:164
本文介绍了iOS 6.0:UISplitViewController Popover破坏或Apple改变了设计?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have created a project with master detail template in Xcode 4.5 and deployment target 5.1. Could someone please help me with following UISplitViewController issues please.


  1. 在纵向模式下,主视图从左侧淡入。它不会像在iOS 5.0中以纵向模式使用的那样显示为Popover视图。请参阅附图。如何将主视图设为popover?

  1. In portrait mode, master view fade in from the left. It doesn't appear as Popover view as it used in iOS 5.0 in portrait mode. Please see attached images. How to get the master view as popover?

无论如何我可以在Landscap模式下隐藏主视图吗?

Is there anyway I can hide master view in Landscap mode?

谢谢。

推荐答案

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

This has been the default action since 5.1. From the iOS 6 release notes:


在iOS 5.1中,UISplitViewController类采用滑动
的演示风格呈现左视图(之前在Mail中只看到
)。当通过委托方法提供的现有条形按钮项目或右视图中的
滑动手势
启动演示时,将使用此样式。获取此行为不需要额外的API采用
,并且所有现有的API(包括委托提供的UIPopoverController实例的
)将继续像以前一样工作。

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.

如果您的应用中的手势不可用,则将分割视图控制器的
presentsWithGesture属性设置为NO
将禁用该手势。但是,不鼓励禁用该手势
,因为它的使用可以保留所有
应用程序的一致用户体验。

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.

有一个肮脏的方式来解决这个问题。

There's a dirty way to fix this.

这篇关于iOS 6.0:UISplitViewController Popover破坏或Apple改变了设计?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆