On 2010-12-03, at 11:13 AM, Matt Neuburg wrote: > On Thu, 02 Dec 2010 22:03:50 +0800, Kin Mak <[email protected]> said: >> >> I have just upgraded my XCode to 3.2.5 and built and linked my iPad app >> using iOS 4.2. However, there seems to be a bug regarding navigation's bar >> tint color and popover: >> >> I am having an iPad app using split view controller. The pop over controller >> contains a navigation controller with a table view controller as its root. >> The navigation bar's tint color is a custom color. >> >> If the pop over is popped up in portrait mode, the navigation bar's color >> would switch back to its default color. Afterwards, the tint color would >> stay as the default one even when the navigation bar is displayed in >> landscape mode. >> >> The issue only happens on iOS 4.2. The same app does not have any problem >> when running on iOS 3.2. >> >> Does anyone have the same issue? >> Or do I miss something here. > > As so often with iOS frameworks, it's a timing issue. The split view wants to > be in charge of how the nav bar looks. Your change in the tint color is being > reverted *after* you make it. The way to get around this, as usual, is with > delayed performance (this code is from > splitViewController:willShowViewController:invalidatingBarButtonItem:): > > [((UINavigationController*)aViewController).navigationBar > performSelector:@selector(setTintColor:) > withObject:[UIColor greenColor] afterDelay:0.1]; > > And so on. But please, pick a nicer color. :) m.
Thanks for posting that. I have a similar situation with the added complexity that the popover itself displays its navigation bar and toolbar in colors and styles that don't match what I've configured in Interface Builder for the children of the split view controller. By using something similar to what you describe, but in splitViewController:popoverController:willPresentViewController: I can affect the tint of the buttons but not the toolbar or navigationBar areas shown in the view controller that the popover is presenting. What I'd really like is a "use what IB said to use" property. :-)_______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
