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

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

问题描述

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

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:

色调:

替代文本http://img6.imageshack.us/img6/2650/tint.png

在弹出窗口中显示时:

替代文本http://img707.imageshack.us/img707/9725/screwedup.png

我尝试处理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:

替代文字http://img38.imageshack.us/img38/3237/betterfq.png

但是在返回的途中,按钮处于不一致状态:

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

替代文本http://img802.imageshack.us/img802/1937/inconsistent.png

调用 setNeedsDisplay 等不起作用.

肯定有更简单的方法吗?

Surely there's an easier way?

Apple已做出回应,这是一个错误,已在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确认的错误(bugreport.apple.com上为8276014),并已在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天全站免登陆