在拆分视图控制器的主窗格上使用色调 [英] Using a tint on a split view controller's master pane

查看:382
本文介绍了在拆分视图控制器的主窗格上使用色调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在拆分视图控制器的主窗格中有一个导航控制器。它在导航栏上设置了色调。当此导航控制器显示在拆分视图的弹出窗口中时,弹出窗口不显示黑色popover样式的导航项,而是布局有点搞砸,它使用之前设置的色调:

I have a navigation controller in the master pane of a split view controller. It has a tint set on the navigation bar. When this navigation controller is displayed in the split view's popover, the popover does not show the navigation items in the black popover-style but instead the layout is kind of screwed up and it uses the tint that was set before:

色调:

alt text http://img6.imageshack.us/img6/2650/tint.png

当显示在popover:

When displayed in the popover:

alt text http ://img707.imageshack.us/img707/9725/screwedup.png

我尝试在popover中显示之前处理willPresentViewController等以清除色调,并在返回时恢复色调。这几乎可以工作但是当转换回横向模式时,标准的iPad色调在动画期间在变换之前可见,并且某些导航项目的色调未正确设置:

I tried handling willPresentViewController etc. to clear the tint before displaying in the popover, and restoring the tint when going back. This almost works but when transitioning back to landscape mode the standard iPad tint is visible during the animation before changing back, and the tint on some of the navigation items is not set back correctly:

在显示弹出窗口之前清除色调:

Clearing the tint before showing the popover works:

alt text http://img38.imageshack.us/img38/3237/betterfq.png

但在回来的路上按钮处于不一致状态:

But on the way back the buttons are left in an inconsistent state:

alt text http://img802.imageshack.us/img802/1937/inconsistent.png

调用 setNeedsDisplay 等不起作用。

当然有更简单的方法吗?

Surely there's an easier way?

编辑:

Apple已经回复,这是一个bug,在bugreport.apple.com上以8276014的形式提交。它应该在4.2中固定(从beta 2开始)。

Apple has responded and this is a bug, filed as 8276014 on bugreport.apple.com. It should be fixed in 4.2 (from beta 2 onwards).

推荐答案

事实证明,这是一个被确认的错误由apple(8276014在bugreport.apple.com上)并在iOS 4.2中修复。我从来没有找到任何可接受的解决方法。

As it turns out, this was a bug that was confirmed by apple (8276014 on bugreport.apple.com) and fixed in iOS 4.2. I was never able to find any acceptable workarounds.

这篇关于在拆分视图控制器的主窗格上使用色调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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