Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8033861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:50:01+00:00 2026-06-05T01:50:01+00:00

Say I want to implement some fast searching. User enter some letters and and

  • 0

Say I want to implement some fast searching. User enter some letters and and everytime the letter changes then my program will search the net to give search suggestions.

However, I do not want that function to be called more often than 3 seconds.

How would I do so?

I currently use a timer. Also the “search” the net for auto complete will be done on background so some multithreading issue will show up.

I’ll post codes soon. But most answers are similar with mine.

Oh ya, the complexity is that if users type too fast the grabbing should still be done after 3 seconds. So not right away but still be done.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T01:50:03+00:00Added an answer on June 5, 2026 at 1:50 am

    You can create timer and check updates of your search string. Smth like

    timer = [NSTimer timerWithTimeInterval:3.f target:self selector:@selector(update) userInfo:nil repeats:YES];
    

    then just implement update method

    -(void) update
    {
        BOOL needToSearch = // check if there was changes in your search string
        if ( needToSearch )
        {
            // make new search
        }
    }
    

    just don’t forget too invalidate your timer when you do not need it

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to implement some crypto protocol on C# and want to say that
I want to implement my BroadcastReceiver on pressing some key combination (say if i
Let's say I want to implement a function that is supposed to process an
Say I want to manipulate some files on a floppy drive or a USB
Say I want to implement a database with a lock system, and I use
My problem Let's say I want to hold my messages in some sort of
Let's say we want to implement an equivalent of the PHP's file_get_content . What
let's say i want to implement a distributed database (each node being the replica
For simplicity, let's say I want to do implement a function which takes two
Let's say I want to write a Sudoku solver with some representational abstraction using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.