ios - How to highlight searched text in UITableView rows? -
i have uitableview , uisearchbar associated it. want highlight searched string if substring in row.
if understand question, you're done searching within uitableview if highlight result you've 2 options,
if you're targeting ios 6.0 , higher there's 1 nsattributedstring see doc here, can bold, colored or apply different fonts substring within string like,
this example of highlighted
text
check this, how use nsattributedstring?
or if want support ios 6 previous versions have use attributed labels highlight search, implemented labels are,
if you've not implemented searching in uitableview yet here's example.
Comments
Post a Comment