0
我想构建一个显示空tableview的应用程序。然后用户可以在搜索栏上编写文本,当他们点击搜索按钮时,tableview将被写入创建的数组项。搜索栏搜索数组项并将它们显示在tableview上?
我已经看到这个教程:link text,但我只需要在用户单击SearchButton时进行搜索。我怎样才能做到这一点?我必须使用哪些方法?
我试过这种方法,但它不起作用。
- (void) searchBarSearchButtonClicked:(UISearchBar *)theSearchBar {
NSInteger nVideos = [appDelegate.allVideos count];
NSLog(@"number of videos: %i", nVideos);