UISearchBar - 什么是“搜索结果按钮”对于? [英] UISearchBar - what is "search results button" for?

查看:103
本文介绍了UISearchBar - 什么是“搜索结果按钮”对于?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(重复这个问题,但我想我可以再试一次,因为那个没有回答...)

(Duplicate of this question, but I figured I could try again, since that one wasn't answered...)

iPhone上的UISearchBar有一个选项showsSearchResultsButton。当您打开它时,它会在搜索栏中显示一个带有水平线的按钮,并且您可以实现在用户按下时调用的回调。

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?

推荐答案

Apple在iPad App Store应用程式中使用这个工具。如果您转到类别标签,您会看到各种应用类别。搜索项目,您会得到一个结果列表,当您按完成时,您将再次显示类别屏幕。您以前的搜索字词仍在搜索字段中列出,但现在搜索结果按钮出现在字段中。点击之后,将显示一个UIPopOver,显示上次搜索结果的文本列表。

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.

这篇关于UISearchBar - 什么是“搜索结果按钮”对于?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆