I am implementing a sort of autocomplete for an iOS app. The data I am using for the autocomplete values is a comma-separated text file with about 100,000 strings. This is what I am doing now:
- Read the text file, and create an
NSArraywith 100,000NSString. - As the user types, do
[array containsObject:text]
Surely there is a better/faster way to do this lookup. Any thoughts?