UISearchBar - 什么是“搜索结果按钮”为了?
(重复这个问题,但我想我可以再试一次,因为那个问题没有得到回答......
) iPhone 有一个选项显示搜索结果按钮。当您打开它时,它会在搜索栏中显示一个带有水平线的按钮,您可以实现一个回调,当用户按下它时将调用该回调。
问题是,我在互联网上找不到任何地方说明此按钮的预期用途。我知道我可以让它做任何事情,但我想知道它的实际用途。它应该显示搜索历史记录,还是显示未经过滤的所有项目,或者什么?
(Duplicate of this question, but I figured I could try again, since that one wasn't answered...)
The UISearchBar on the iPhone has an option showsSearchResultsButton. When you turn it on, it shows a button with horizontal lines inside the search bar, and you can implement a callback that will be called when the user presses it.
The thing is, I can't find a single place on the Internet where it says what the intended purpose of this button is. I know I could make it do anything, but I'd like to know what it's actually for. Should it show a history of searches, or all items without filtering, or what?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它只是在点击时显示搜索结果。
Apple 在其 iPad App Store 应用程序中使用此功能。如果您转到“类别”选项卡,您将看到各种应用程序类别。搜索项目,您将获得结果列表,当您按“完成”时,您将再次显示类别屏幕。您之前的搜索词仍列在搜索字段中,但现在搜索结果按钮出现在该字段中。点击此按钮后,将显示 UIPopOver,其中显示上次搜索结果的文本列表。
It's simply to show search results when tapped.
Where Apple uses this is in their iPad App Store application. If you go to the Categories tab you'll see various app categories. Search for an item, you'll get a list of results, and when you press "Done" you are shown the categories screen again. Your previous search term is still listed in the search field, but now the Search Results Button appears in the field. After tapping this, a UIPopOver is displayed, showing a text list of the results from your last search.