Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. #pragma mark -
  2. #pragma mark UISearchDisplayController Delegate Methods
  3.  
  4. - (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller{
  5.  
  6. NSLog(@"Old frame %@",NSStringFromCGRect(oldTableViewFrame));
  7. [UIView beginAnimations:@"" context:NULL];
  8. [UIView setAnimationDuration:1.5];
  9. self.receiptsTableView.frame= self.view.bounds;
  10. [UIView commitAnimations];
  11.  
  12. }
  13. - (void)searchDisplayControllerWillEndSearch:(UISearchDisplayController *)controller{
  14. [UIView beginAnimations:@"" context:NULL];
  15. [UIView setAnimationDuration:1.5];
  16. self.receiptsTableView.frame= CGRectMake(self.view.bounds.origin.x, self.view.bounds.origin.x+self.imageContentView.bounds.size.height, self.view.bounds.size.width, self.view.bounds.size.height-self.imageContentView.bounds.size.height);
  17. [UIView commitAnimations];
  18. }
  19.  
  20.  
  21. - (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString
  22. {
  23. [self filterContentForSearchText:searchString scope: (NSString*)scopes[[self.searchDisplayController.searchBar selectedScopeButtonIndex]]];
  24.  
  25. // Return YES to cause the search result table view to be reloaded.
  26. return YES;
  27. }
  28.  
  29.  
  30. - (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchScope:(NSInteger)searchOption
  31. {
  32. [self filterContentForSearchText:[self.searchDisplayController.searchBar text] scope:scopes[searchOption]];
  33.  
  34. // Return YES to cause the search result table view to be reloaded.
  35. return YES;
  36. }
  37.  
  38. – searchDisplayControllerWillBeginSearch:
  39. – searchDisplayControllerDidBeginSearch:
  40.  
  41. – searchDisplayControllerWillEndSearch:
  42. – searchDisplayControllerDidEndSearch:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement