Skip to content

Commit

Permalink
搜索结果的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
coderyi committed Sep 17, 2019
1 parent b79c6a7 commit 410fe8e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions NetworkEye/NetworkEye/NEHTTPEyeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,7 @@ - (void)backBtAction {
#pragma mark - UITableViewDataSource &UITableViewDelegate

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (tableView == mySearchDisplayController.searchResultsTableView || mySearchController.isActive) {
if (mySearchController.isActive && mySearchController.searchBar.text.length < 1) {
return httpRequests.count;
}
if (tableView == mySearchDisplayController.searchResultsTableView || (mySearchController.isActive && mySearchController.searchBar.text.length > 0)) {
return filterHTTPRequests.count;
}
return httpRequests.count;
Expand Down Expand Up @@ -322,7 +319,7 @@ - (void)didReceiveMemoryWarning {
#pragma mark - private methods
- (NEHTTPModel *)modelForTableView:(UITableView *)tableView atIndexPath:(NSIndexPath *)indexPath {
NEHTTPModel *currenModel=[[NEHTTPModel alloc] init];
if (tableView == mySearchDisplayController.searchResultsTableView) {
if (tableView == mySearchDisplayController.searchResultsTableView || (mySearchController.isActive && mySearchController.searchBar.text.length > 0)) {
currenModel=(NEHTTPModel *)((filterHTTPRequests)[indexPath.row]);
}else{
currenModel=(NEHTTPModel *)((httpRequests)[indexPath.row]);
Expand Down

0 comments on commit 410fe8e

Please sign in to comment.