针对5.1 SDK进行编译会强制新的UIPopoverController“滑入”弹出窗口的介绍 - 如何禁用? [英] Compiling against 5.1 SDK forces new UIPopoverController "slide in" presentation of popovers -- how to disable?

查看:108
本文介绍了针对5.1 SDK进行编译会强制新的UIPopoverController“滑入”弹出窗口的介绍 - 如何禁用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据5.1 SDK(发行版)编译我的iPad应用程序会导致UIPopoverController使用左侧演示文稿中的新幻灯片显示自己。这完全打破了我的popover演示,它依赖于具有黑色样式标题和一定高度。我已经尝试将 presentsWithGesture 设置为,但这似乎只是禁用滑动手势,并且不会停止演示风格。

Compiling my iPad app against the 5.1 SDK (release version) causes UIPopoverController to show itself using the new "slide in" from the left presentation. This completely breaks my popover presentation, which relied on having a "black" style header and a certain height. I've tried setting presentsWithGesture to NO, but that only seems to disable the swipe gesture, and doesn't stop the presentation style.

这个相同的应用程序,无需重新编译,但在iOS 5.1上运行,使用旧的popover演示文稿样式。所以我知道iOS 5.1仍然支持向后兼容的方法。如何选择激活popover的旧演示文稿?

This same app, without being recompiled, but running on iOS 5.1, uses the old popover presentation style. So I know iOS 5.1 still supports the backwards-compatible method. How can I choose to activate the old presentation of the popover?

不幸的是,这对我的应用程序非常重要。

This is really critical to my app, unfortunately.

如果失败了,有没有办法在新的弹出窗口上获得黑色样式标题?

Failing that, is there any way to get the "black" style header on the new popovers?

虽然我的应用程序中有一个UISplitViewController,它不负责显示弹出窗口。相反,我正在使用此代码:

Although I have a UISplitViewController in my app, it is not responsible for showing the popover. Instead, I'm using this code:

   [self.popoverController presentPopoverFromRect:ipadButtonMenu.frame
                                           inView:self.view
                         permittedArrowDirections:UIPopoverArrowDirectionUp
                                         animated:YES];

此问题是来自Apple开发者论坛的交叉帖子这里。我希望有人有答案。

This question is a cross-post from the Apple Developer Forums here. I'm hoping somebody has the answer.

预期演示文稿:

在iOS 5.1 SDK下编译后的演示文稿:

Presentation after compiling under iOS 5.1 SDK:

推荐答案

此更改似乎很差深思熟虑。当然,我们在使用滑动的细节视图中打破任何东西。太棒了!

This change seems poorly thought out. Sure guys, we break anything in the detail view that uses a swipe. Awesome!

要回答你的带回黑色问题,如果它只是顶部导航栏颜色的问题,你可以使用外观代理。例如:

To answer your 'bring back the black' question, if it's merely a question of the top navbar color, you could use the appearance proxy. For example:

[[UINavigationBar appearance] setTintColor:[UIColor blackColor]];

如有必要,可以非常具体地设置外观代理;它有一个容器模型。上面有一个非常好的WWDC视频。

The appearance proxy can be set very specifically if necessary; it has a containers model. There's a very good WWDC video on it.

关于刚刚恢复使用新编译器的旧行为,坦率地说,我也很想知道。新行为还会破坏主视图中的操作表;以前,当主视图以弹出窗口呈现时,他们会做正确的事情。现在,这是一个断言失败。

With respect to just reverting to the old behavior with the new compiler, frankly, I'd love to know as well. The new behavior also breaks action sheets in the master view; previously, when the master view was presented in a popover, they'd do the right thing. Now, it's an assertion failure.

这篇关于针对5.1 SDK进行编译会强制新的UIPopoverController“滑入”弹出窗口的介绍 - 如何禁用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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