Latest 0.1.4
Homepage https://github.com/rinat-enikeev/REAutoComplete
License MIT
Platforms ios 8.0
Authors

![CI Status](http://img.shields.io/travis/Rinat Enikeev/REAutoComplete.svg?style=flat)
Version
License
Platform

UITextField category to add autocomplete suggestions in a UITableView.

Usage

Adapt REAutoCompleteItem protocol:

#import <REAutoComplete/REAutoComplete.h>

@interface NSString (REAutoCompleteItem) <REAutoCompleteItem>
@end
@implementation NSString (REAutoCompleteItem)
- (NSString*)autoCompleteText {
    return self;
}
@end

DataSource based:

#import <REAutoComplete/REAutoComplete.h>

- (void)viewDidLoad {
    [super viewDidLoad];

    self.textField.autoComplete.dataSource = self;
    self.textField.autoComplete.delegate = self;
}

#pragma mark <REAutoCompleteDataSource>
- (void)autoComplete:(REAutoComplete*)autoComplete suggestionsFor:(NSString*)query whenReady:(void (^)(NSArray<id<REAutoCompleteItem>>* suggestions))callback {
    callback(@[@"suggestion"]);
}

Algorithm based:


#import <REAutoComplete/REAutoComplete.h>

- (void)viewDidLoad {
    [super viewDidLoad];
    id<REAutoCompleteAlgorithm> algorithm = <algorithm>;
    self.textField.autoComplete.algorithm = algorithm;
    self.textField.autoComplete.delegate = self;
}

Installation

REAutoComplete is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'REAutoComplete'

Author

Rinat Enikeev, http://rinat-enikeev.github.io

License

REAutoComplete is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "REAutoComplete",
    "version": "0.1.4",
    "summary": "UITextField suggestions in UITableView",
    "description": "Auto complete solution for UITextField.",
    "homepage": "https://github.com/rinat-enikeev/REAutoComplete",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Rinat Enikeev": "rinat-enikeev.github.io"
    },
    "source": {
        "git": "https://github.com/rinat-enikeev/REAutoComplete.git",
        "tag": "0.1.4"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "REAutoComplete/Classes/**/*"
}

Pin It on Pinterest

Share This