YSLGoogleSuggestView 0.0.2

YSLGoogleSuggestView 0.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release May 2015

Maintained by y-hryk.



  • By
  • y-hryk

using google suggtest api.

Demo

Dome

Requirement

not support landscape

Install

Manually

Copy YSLGoogleSuggestView directory to your project.

Usage

Delegate

    @interface ViewController () <YSLGoogleSuggestViewDelegate>

    - (IBAction)searchBtnTap:(id)sender
    {
       YSLGoogleSuggestView *gSuggestView = [[YSLGoogleSuggestView alloc]initWithSaveSearchResult:YES];
        gSuggestView.delegate = self
       [gSuggestView showSuggestView];
    }

    #pragma mark -- YSLGoogleSuggestView Delegate
    - (void)suggestViewSearchResult:(NSString *)word
    {
        NSLog(@"Search Word (delegate) : %@",word);
    }

Blocks

    - (IBAction)searchBtnTap:(id)sender
    {
       YSLGoogleSuggestView *gSuggestView = [[YSLGoogleSuggestView alloc]initWithSaveSearchResult:YES];
      [gSuggestView showSuggestViewWithHandler:^(NSString *word) {
          NSLog(@"Search Word (blocks) %@", word);
       }];
    }

Property

    gSuggestView.placeholderText = @"Sample";
    gSuggestView.placeholderTextColor = [UIColor greenColor];
    gSuggestView.headerBackgroudColor = [UIColor redColor];
    gSuggestView.textFieldBackgroudColor = [UIColor purpleColor];
    gSuggestView.textFieldFont = [UIFont fontWithName:@"Futura-Medium" size:13];
    gSuggestView.textFieldTextColor = [UIColor darkGrayColor];

    gSuggestView.tableBackgroudColor = [UIColor yellowColor];
    gSuggestView.tableCellFont = [UIFont fontWithName:@"Futura-Medium" size:13];
    gSuggestView.tableCellTextColor = [UIColor darkGrayColor];
    gSuggestView.cancelButtonTextColor = [UIColor blueColor];

Licence

MIT