Latest 0.1.4.0
Homepage https://github.com/AlvaroOlave/MemoryTextField
License MIT
Platforms ios 8.0, requires ARC
Frameworks SystemConfiguration
Authors

MemoryTextField adds autocomplete functionality to your UITextFields in the simplest form.

readmeImg

Installation

In your Podfile:

pod ‘MemoryTextField’, ‘~> 0.1’

Usage

Just make your UITextField inherit from MemoryTextField and invoke the next methods in the right place:

- (void)setNameKey:(NSString *)key; 

Key used to read from the NSUserDefaults. If you don´t set this key, will be used the default key. TextFields with same key will share the same autocomplete words.

- (void)saveNewEntry;

Invoke this method when you want to save the current word. (e.g. In -(BOOL)textFieldShouldReturn:(UITextField*)textField method.)

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

In your textField´s delegate, implement

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

and return the result of invoke this MemoryTextField method.

Added support for your own persistence, in case that don´t want to use the NSUserDefaults.

License

MemoryTextField is available under the MIT license.

Latest podspec

{
    "name": "MemoryTextField",
    "platforms": {
        "ios": "8.0"
    },
    "summary": "AOMemoryTextField provide autocomplete to a UITextField.",
    "requires_arc": true,
    "version": "0.1.4.0",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "AlvaroOlave": "alvaro.olave.baneres@gmail.com"
    },
    "homepage": "https://github.com/AlvaroOlave/MemoryTextField",
    "source": {
        "git": "https://github.com/AlvaroOlave/MemoryTextField.git",
        "tag": "0.1.4.0"
    },
    "frameworks": "SystemConfiguration",
    "source_files": "AOMemoryTextField/*.{h,m}"
}

Pin It on Pinterest

Share This