MLPAutoCompleteTextField icon indicating copy to clipboard operation
MLPAutoCompleteTextField copied to clipboard

Turn off auto complete

Open yakubbaev opened this issue 10 years ago • 1 comments

Is there any way to turn off auto complete stuff and use MLPAutoCompleteTextField as a stock UITextField ? I mean without altering any of its properties, e.g inputAccessoryView.

yakubbaev avatar Apr 14 '15 16:04 yakubbaev

I guess you could achieve the result you need by implementing the MLPAutoCompleteTextField datasource method and return an empty array for the possible suggestions. This will cause the autocomplete table not to appear. Something like this on the datasource class will have the desired results:

- (void)autoCompleteTextField:(MLPAutoCompleteTextField *)textField
 possibleCompletionsForString:(NSString *)string
            completionHandler:(void (^)(NSArray *))handler
{
        handler(@[]);
}

csknns avatar Apr 14 '15 17:04 csknns