Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma mark -
- #pragma mark UISearchDisplayController Delegate Methods
- - (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller{
- NSLog(@"Old frame %@",NSStringFromCGRect(oldTableViewFrame));
- [UIView beginAnimations:@"" context:NULL];
- [UIView setAnimationDuration:1.5];
- self.receiptsTableView.frame= self.view.bounds;
- [UIView commitAnimations];
- }
- - (void)searchDisplayControllerWillEndSearch:(UISearchDisplayController *)controller{
- [UIView beginAnimations:@"" context:NULL];
- [UIView setAnimationDuration:1.5];
- 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);
- [UIView commitAnimations];
- }
- - (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString
- {
- [self filterContentForSearchText:searchString scope: (NSString*)scopes[[self.searchDisplayController.searchBar selectedScopeButtonIndex]]];
- // Return YES to cause the search result table view to be reloaded.
- return YES;
- }
- - (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchScope:(NSInteger)searchOption
- {
- [self filterContentForSearchText:[self.searchDisplayController.searchBar text] scope:scopes[searchOption]];
- // Return YES to cause the search result table view to be reloaded.
- return YES;
- }
- – searchDisplayControllerWillBeginSearch:
- – searchDisplayControllerDidBeginSearch:
- – searchDisplayControllerWillEndSearch:
- – searchDisplayControllerDidEndSearch:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement