UIBarButton没有'按'动画

时间:2010-09-14 14:56:19

标签: iphone uinavigationbar uibarbuttonitem uicolor

我有一个UIView,我正在加载它有一个带有'完成'barButton的导航栏。当我将导航栏保留为默认颜色时,一切都很好。当我使它具有黑色色调时,“完成”按钮工作正常但它没有按钮通常具有的按下动画。它看起来并不像按下按钮那样。有谁知道这是为什么?

self.navigationController.navigationBar.tintColor = [UIColor blackColor];
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] 
                                           initWithTitle: NSLocalizedString(@"Done", @"")
                                           style:UIBarButtonItemStyleDone
                                           target:self 
                                           action:@selector(donePressed:)] 
                                          autorelease];

非常感谢你!

1 个答案:

答案 0 :(得分:0)

[UIColor blackColor]不为推效果提供第二种颜色。你最好的选择是在navigationBar上使用darkGreyColor,或者如果你真的需要黑色,那么你必须自己制作动画。

我听说黑色没有第二种颜色的原因是因为没有比黑色更暗的颜色。