我想知道这是否可以在 UItoolbar 中添加搜索栏
问问题
2113 次
3 回答
0
我只是快速浏览了一下,虽然界面构建器会让您这样做,但当您尝试保存警告时会弹出一条警告,提示“非 iPad 文档中的 UIBarButtonItems 不支持 UISearchBars”。话虽如此,您可以制作自己的视图,使其看起来和工作起来都像允许 UISearchBar 的 UIToolbar。
于 2010-06-19T09:34:31.100 回答
0
你可以嵌套:
navItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithCustomView: m_searchBar] autorelease];
于 2011-02-17T01:39:38.027 回答
0
如果您收到错误说明:
UISearchBars are not supported in UIBarButtonItems in non-iPad documents
在为我工作UISearchBar
的视图中添加一个。UIBarButtonItem
于 2011-11-17T04:42:21.003 回答