TRAutocompleteView icon indicating copy to clipboard operation
TRAutocompleteView copied to clipboard

Allow strings as content of autosuggestion instead of objects that have to conform to TRSuggestionItem

Open rickpastoor opened this issue 11 years ago • 2 comments

That would make life easier as we could write this:

- (void)itemsFor:(NSString *)query whenReady:(void (^)(NSArray *))suggestionsReady
{
    suggestionsReady(@[@"foo", @"bar"]);
}

rickpastoor avatar Jun 13 '13 09:06 rickpastoor

Imagine a situation when you want to autocomplete Contacts - e.g. user types Name OR Email, you provide autocomplete items as he types. Take a look at iOS contacts autocompletion, it shows autocomplete items with name/email - 2 strings. Also, in some cases you may want to provide nice images with string, etc. It's done for flexibility, you can wrap string in object, but you can also provide more sophisticated autocomplete with Multiple strings and even images

troshko111 avatar Jun 13 '13 10:06 troshko111

I get that, but wouldn't it be great if both are supported?

rickpastoor avatar Jun 13 '13 11:06 rickpastoor