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,

1) tttattributedlabel

2) ohattributedlabel

if you've not implemented searching in uitableview yet here's example.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -