1

in three20 TTCatalog has this demo:SearchTestController

i don't know why use TTListDataSource would auto reload data??

i try to copycat but i fail...

i use TTListDataSource ,and like this (its the subclass of TTTableViewController)

   [super loadView];
  self.array = [[NSMutableArray alloc] initWithObjects:@"a",@"b", nil];
self.source = [[TT520SearchSource alloc] initWithOtherItems:self.array];
[self bindData];
TTTableViewController   *ttsearch = [[TTTableViewController alloc] initWithStyle:UITableViewStylePlain];

ttsearch.dataSource =  self.source;

self.searchViewController =ttsearch;
self.tableView.tableHeaderView = _searchController.searchBar;

as you look,TT520SearchSource is the subclass of TTListDataSource

after that,my question is :

  1. why my tableview can't auto reload data ??(in TT520SearchSource will call the 'search' method when i type some word)
  2. is it some delegate i don't know in this demo??
  3. i try to do the same thing without three20(apple demo),its work,so i don't understand TTListDataSouce and TTModel 's relationship.

many thanks!

kimsnow
  • 11
  • 3

0 Answers0