2

我一直试图在我的工具栏中有一个 UIBarButtonSystemItem ,它总是默认为标准蓝色。如果我使用图像或标题创建它,它可以使用正确的颜色正常工作,请使用 UIBarButtonSystemItem 尝试它,它会变为默认颜色,而我在互联网上找不到任何东西。

继承人的代码:

UIBarButtonItem *overlays = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemPageCurl target:self action:@selector(overlays)];
4

2 回答 2

0

必须创建我自己的按钮。似乎是 initWithBarButtonSystemItem 默认返回标准颜色的一个错误。很少有人要求苹果修复它,但到目前为止还没有运气。

于 2010-08-16T10:56:04.650 回答
0

我意识到这是旧的,但按钮的颜色取决于导航栏的颜色。您必须像以前一样创建自定义按钮。这很可能是 Apple HIG 交易。

于 2011-05-01T13:42:53.627 回答