1
여기에 약간의 문제가 있습니다. 텍스트를 입력 할 때 검색 막대가 검색되는 이유는 무엇입니까? 코드는 다음과 같습니다.목표 C UISearchBar
- (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar {
[searchBar setShowsCancelButton:YES animated:YES];
self.theTableView.allowsSelection = NO;
self.theTableView.scrollEnabled = NO;
[theTableView setRowHeight:110];
}
- (void)searchDisplayController:(UISearchDisplayController *)controller willShowSearchResultsTableView:(UITableView *)tableView {
[tableView setRowHeight:[[self theTableView] rowHeight]];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.tableData removeAllObjects];
}
- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar {
[email protected]"";
[searchBar setShowsCancelButton:NO animated:YES];
[searchBar resignFirstResponder];
self.theTableView.allowsSelection = YES;
self.theTableView.scrollEnabled = YES;
}
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
// all the function to search
}
Perfect. 감사. –
테이블에서 다시로드하려는 경우, 그물에서 새 데이터를 가져온 다음에는 어떻게해야합니까? 나는 무엇을 할 것이냐? –