diff --git a/NetworkEye/NetworkEye/NEHTTPEyeViewController.m b/NetworkEye/NetworkEye/NEHTTPEyeViewController.m index 2ba1122..6e8281a 100644 --- a/NetworkEye/NetworkEye/NEHTTPEyeViewController.m +++ b/NetworkEye/NetworkEye/NEHTTPEyeViewController.m @@ -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; @@ -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]);