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

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

问题描述

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

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 上运行,使用旧的弹出框演示样式.所以我知道 iOS 5.1 仍然支持向后兼容的方法.如何选择激活弹出框的旧演示文稿?

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天全站免登陆