Skip to content

Commit 410fe8e

Browse files
committed
搜索结果的问题
1 parent b79c6a7 commit 410fe8e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

NetworkEye/NetworkEye/NEHTTPEyeViewController.m

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,7 @@ - (void)backBtAction {
160160
#pragma mark - UITableViewDataSource &UITableViewDelegate
161161

162162
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
163-
if (tableView == mySearchDisplayController.searchResultsTableView || mySearchController.isActive) {
164-
if (mySearchController.isActive && mySearchController.searchBar.text.length < 1) {
165-
return httpRequests.count;
166-
}
163+
if (tableView == mySearchDisplayController.searchResultsTableView || (mySearchController.isActive && mySearchController.searchBar.text.length > 0)) {
167164
return filterHTTPRequests.count;
168165
}
169166
return httpRequests.count;
@@ -322,7 +319,7 @@ - (void)didReceiveMemoryWarning {
322319
#pragma mark - private methods
323320
- (NEHTTPModel *)modelForTableView:(UITableView *)tableView atIndexPath:(NSIndexPath *)indexPath {
324321
NEHTTPModel *currenModel=[[NEHTTPModel alloc] init];
325-
if (tableView == mySearchDisplayController.searchResultsTableView) {
322+
if (tableView == mySearchDisplayController.searchResultsTableView || (mySearchController.isActive && mySearchController.searchBar.text.length > 0)) {
326323
currenModel=(NEHTTPModel *)((filterHTTPRequests)[indexPath.row]);
327324
}else{
328325
currenModel=(NEHTTPModel *)((httpRequests)[indexPath.row]);

0 commit comments

Comments
 (0)