1

I want my user to be able to, when they are searching that under the text field they get choices. As en example if I am searching apple then under i get choices like apple, apple store, etc.I am very new to this topic. Huge thanks in advance!

DrummerB
  • 39,814
  • 12
  • 105
  • 142
user1592698
  • 98
  • 1
  • 8
  • I believe this is what you are looking for. [http://stackoverflow.com/questions/5102878/google-suggest-api][1] [1]: http://stackoverflow.com/questions/5102878/google-suggest-api – geraldWilliam Sep 29 '12 at 01:45
  • you want to search data using webservices..? – Rushabh Sep 29 '12 at 04:50

1 Answers1

4

You Can Do, If The Data is With You

if([textField.text length] > 0 || textField.text != nil)
    {
        for(int i = 0; i < [array1 count]; i++)
        {
                NSString *strName = [NSString stringWithFormat:@"%@", [[array1 objectAtIndex:i] valueForKey:@"value"]];         
                if([[strName lowercaseString] hasPrefix:[newString lowercaseString]])
                {
                    [array2 addObject:[array1 objectAtIndex:i]];
                }
            }
        }
    }

Add This Code in

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string

Add A UITableView below your UITextField According To your Frame. Display the Array2 Details in UITableView.

Try This it May Helps You

Nookaraju
  • 1,668
  • 13
  • 24
MadhuP
  • 2,019
  • 17
  • 22