YSLGoogleSuggestView 0.0.2

YSLGoogleSuggestView 0.0.2

测试已测试
语言编程语言 Obj-CObjective C
许可证 MIT
发布最后发布2015年5月

y-hryk 维护。



  • y-hryk

使用 google suggtest api。

演示

Dome

要求

不支持横屏

安装

手动安装

将 YSLGoogleSuggestView 目录复制到您的项目中。

用法

代理

    @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);
    }

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

属性

    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];

许可证

MIT