如何在iPhone中实现搜索栏? [英] How to implement search bar in iPhone?
问题描述
我正在尝试实现一个标签栏应用程序,其中一个标签随搜索栏提供。
当我在搜索字段中输入一些数据后点击搜索按钮时,我应该得到一个显示搜索结果的 tableview
。应将 tableview
添加为子视图。
我该如何实现呢?
I am trying to implement a tab bar application in which a tab is provided with Search bar.
When I click on the Search button after entering some data into the search field, I should get a tableview
displaying the search results. The tableview
should be added as a subview.
How should I implement this?
推荐答案
UISearchBar是工具箱中的一个控件,你需要实现它,并实现它搜索按钮按事件将tableview添加为子视图。
UISearchBar is a control in toolbox, you need to implement it, and implement search button press event to add tableview as a subview.
您可以在此处查询类似的帖子
you can consult with the similar thread here
< a href =https://stackoverflow.com/questions/1302962/uisearchbar-sample-code> UISearchBar示例代码
这篇关于如何在iPhone中实现搜索栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!