Jump to content

iOS app search field suggestions


Andi_bz

Recommended Posts

Andi_bz

Hi,

 

I think a live search would be great. To implement this my suggestion:

- (IBAction)searchTextFieldEditingChanged:(UITextField *)sender {
    SEL fetchSearchResults = @selector(downloadData); //call the search function 
    [[self class] cancelPreviousPerformRequestsWithTarget:self selector:fetchSearchResults object:nil];
    [self performSelector:fetchSearchResults withObject:nil afterDelay:1];
   }

If the user input text under 1 sec the search will not be executed to avoid continues emby-server requests. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...