UIBarButtonSystemItemPageCurl 不显示,其他系统图标显示

UIBarButtonSystemItemPageCurl not showing, other system icon does

我正在使用定制的工具栏 (UIToolBar),它将显示一些 items/buttons。然而,其中之一 没有 出现。它就在那里,我可以点击它,它会响应并触发选择器,但它是不可见的。

这是我构建工具栏的方式:

spacer=    [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil] autorelease];
menuItem=  [[[UIBarButtonItem alloc] initWithImage:[JASidePanelController defaultImage] style:UIBarButtonItemStylePlain target:(TabController*)self.parentViewController action:@selector(handleShowMenu)] autorelease];
addItem=   [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:[Storage currentStorage] action:@selector(showAddDialog)] autorelease];
titleItem= [[[UIBarButtonItem alloc] initWithTitle:[self pageTitle] style:UIBarButtonItemStylePlain target:nil action:nil] autorelease];

UIBarButtonItem* mapItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks target:self action:@selector(toggleMapType)] autorelease];

NSArray* items= [NSArray arrayWithObjects:menuItem, spacer, titleItem, spacer, mapItem, addItem, nil];

toolbar= [[[UIToolbar alloc] initWithFrame:CGRectMake(0.0, 20.0, self.view.frame.size.width, TOOLBARHEIGHT)] autorelease];

[toolbar setItems:items];
[self.view addSubview:toolbar];

这不会显示:

UIBarButtonItem* mapItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemPageCurl target:self action:@selector(toggleMapType)] autorelease];

但将此行替换为:

UIBarButtonItem* mapItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks target:self action:@selector(toggleMapType)] autorelease];

将使项目显示。

有谁知道为什么

根据UIBarButtonSystemItem docs,

This bar button image can be used only for bar button items placed on toolbars.

您正试图将其放置在导航栏上,这是不允许的。

看起来像这样:

这不完全符合 iOS 7+ 设计指南,因此这也可能是一个问题,但文档没有说明弃用,所以不应该。