I have a NSArray
of NSString
s.
For example: @"Good item", @"Very good item", @"The best of the best item"
Upon searching on UITextField
, the user types @"Very good item"
. I need to sort the source array by relevance and would like to see result as:
@"Very good item" <- the best match with the search phrase
@"Good item"
@"The best of the best item"
Please suggest me the best way to do it in Objective-C.
Thanks.