开发者

IPAD - UISplitViewController's MainWindow NavigationBar tintColor Problem

Problem:

TintColor of the navigationBar of mainWindow gets back to grey color everytime I turn the iPad to portrait mode and show the popover.

开发者_如何转开发

Details:

  • I created application from Xcode 3.2.5 and selected Split-View Based Application.
  • I changed the navigationBar tintColor of the MainWindow.xib to blue using the Interface builder.
  • Then, I run the app initially with landscape mode, and the tintColor showed with the value blue on the simulator.
  • When, I changed the orientation to portrait and clicked the button to show the MainWindow popover, its navBar blends with the border of the popover, ignoring blue.
  • But when I turned back the orientation to landscape mode, the tintColor of the MainWindow goes back to its original color which is Gray. And I can no longer edit its value even the code is written to viewDidAppear block.

Is this a bug? or are there more settings I need to configure for this to work?

Thanks in Advance

-- Jo


I found workaround on devforums.apple.com from hoodah to change the class of the navigationbar using the Interface Builder to the class code below:

@interface iPadNavigationBar : UINavigationBar

@end

@implementation iPadNavigationBar

- (void)setTintColor:(UIColor *)tintColor
{
     // Bug workaround. 
     [super setTintColor:[self tintColor]];
}

@end

Hope it helps..


Deffinately a bug, I submitted a developer support request to Apple and they basically said it was a known issue.

I have posted source code with a working example. http://realprogrammersdontgarbagecollect.blogspot.com/2011/01/splitviewcontroller-with-navigationbar.html


I think it's a bug and I've been having the problem also. If you have a small test case, I'd suggest raising it over on the Apple forums.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜