iphone编程 [英] iphone programming

查看:138
本文介绍了iphone编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 interface bilder uisearch bar 添加到表视图 c $ c>

how to add uisearch bar to a table view using interface bilder

推荐答案

嗯,你不能使用界面构建器做到这一点。

Well you can't do that using interface builder.

您需要实现UITableView的DataSource和Delegater来初始化并向表中添加内容,当您这样做时,您可以在特定单元格中添加UISearchBar。

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.

所以请接受我的建议添加UISearchBar使用IB的UITableView顶部。它很容易做,用户也会很开心。

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

这篇关于iphone编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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