2011-01-20 44 views
2

如何使用interface bilderiPhone编程

+0

可能的重复[如何在iPhone应用程序的UITableView上实现UISearchBar?](http://stackoverflow.com/questions/4295450/how-do-i-implement-the-uisearchbar-on-a- UITableView的功能于iphone-APP) – 2011-01-24 16:11:23

回答

1

那么你不能做到这一点使用Interface Builder uisearch bar添加到table view

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

但这是一个糟糕的设计,因为用户在向下滚动时无法使用搜索选项。

所以改为采取我的建议在UITableView上使用IB添加UISearchBar。它很容易做到,用户也会很开心。