Latest 0.0.2
Homepage https://github.com/y-hryk/YSLGoogleSuggestView
License MIT
Platforms ios 7.0, requires ARC
Authors

using google suggtest api.

Demo

Dome

Requirement

not support landscape

Install

Manually

Copy YSLGoogleSuggestView directory to your project.

CocoaPods

Add pod ‘YSLGoogleSuggestView’ to your Podfile.

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

Latest podspec

{
    "name": "YSLGoogleSuggestView",
    "version": "0.0.2",
    "summary": "google auto completion",
    "homepage": "https://github.com/y-hryk/YSLGoogleSuggestView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "y-hryk": "[email protected]"
    },
    "source": {
        "git": "https://github.com/y-hryk/YSLGoogleSuggestView.git",
        "tag": "0.0.2"
    },
    "source_files": "YSLGoogleSuggestView/**/*.{h,m}",
    "requires_arc": true,
    "platforms": {
        "ios": "7.0"
    }
}

Pin It on Pinterest

Share This