diff --git a/Dash/DHDBSearchController.m b/Dash/DHDBSearchController.m index 59a740f0..71d23467 100644 --- a/Dash/DHDBSearchController.m +++ b/Dash/DHDBSearchController.m @@ -133,7 +133,7 @@ - (void)searchDisplayControllerDidEndSearch:(UISearchDisplayController *)control } - (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString -{ +{ if(self.isRestoring) { self.displayController.searchResultsTableView.allowsSelection = YES; @@ -168,11 +168,11 @@ - (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldRe - (void)searchDisplayController:(UISearchDisplayController *)controller willShowSearchResultsTableView:(UITableView *)tableView { - } - (void)searchDisplayController:(UISearchDisplayController *)controller willHideSearchResultsTableView:(UITableView *)tableView { + [self.searcher cancelSearch]; self.searcher = nil; } diff --git a/Dash/DHDocsetDownloader.m b/Dash/DHDocsetDownloader.m index 5c5c8756..203d59b6 100644 --- a/Dash/DHDocsetDownloader.m +++ b/Dash/DHDocsetDownloader.m @@ -764,4 +764,10 @@ - (id)initWithCoder:(NSCoder *)aDecoder return self; } +- (void)viewWillDisappear:(BOOL)animated +{ + [super viewWillDisappear:animated]; + [self.searchController setActive:NO animated:YES]; +} + @end diff --git a/Dash/UIView+DHUtils.m b/Dash/UIView+DHUtils.m index 9a16310d..3b53d073 100644 --- a/Dash/UIView+DHUtils.m +++ b/Dash/UIView+DHUtils.m @@ -37,4 +37,4 @@ CGPoint CGIncreasePoint(CGPoint point, CGFloat x, CGFloat y) { CGSize CGIncreaseSize(CGSize size, CGFloat width, CGFloat height) { return CGSizeMake(size.width+width, size.height+height); -} \ No newline at end of file +}