License MIT
Platforms ios 8.0, requires ARC
Frameworks SystemConfiguration

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



In your Podfile:

pod ‘MemoryTextField’, ‘~> 0.1’


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.


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": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "AlvaroOlave": "[email protected]"
    "homepage": "",
    "source": {
        "git": "",
        "tag": ""
    "frameworks": "SystemConfiguration",
    "source_files": "AOMemoryTextField/*.{h,m}"

Pin It on Pinterest

Share This