How to add uisearch bar to a tableview using interface builder?

僤鯓⒐⒋嵵緔 提交于 2019-12-20 03:31:32

问题


How do we add uisearch bar to a table view using interface builder?


回答1:


Well you can't do that using interface builder.

You need to implement the DataSource and Delegater of the UITableView to initialize and add contents to the table and while you are doing that you can add the UISearchBar in a particular cell.

But that is a bad design as such the user wont be able to use search option as he scrolls down.

so instead take my advice add UISearchBar on top of UITableView using IB. Its easy to do and the user will be happy too.



来源:https://stackoverflow.com/questions/4743523/how-to-add-uisearch-bar-to-a-tableview-using-interface-builder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!