0
私はUITableViewControllerの子であるListViewController
スーパークラスを作成し、ListViewController
の子であるCoutryListViewController
を作成しますが、CountryListViewController.m
ではnumberOfRowsInSection関数は呼び出されません。以下のような子のnumberOfRowsInSection関数は呼び出されませんか?
CountryListViewController.m
実装で
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
if ([tableView isEqual:self.searchDisplayController.searchResultsTableView]) {
// search
return 1;
}
return self.indexTitles.count;
}
::のようなListViewController.m
実装で
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if ([tableView isEqual:self.searchDisplayController.searchResultsTableView]) {
// search
return self.searchResults.count;
}
NSLog(@"statesArray count: %ld", self.statesArray.count);
return self.statesArray.count;
}