1

Using UISearchBar searching text in UITableView. I just want to know how to highlight searched text. Highlighting could be make text bold or change text color.

E.g. If I'm searching text "Stack" using UISearchBar in UITableView which contains a row with string "Stackoverflow", now my search result should appear this way "Stackoverflow".

Thanks in advance.. Happy coding..

Kuldeep Shige
  • 415
  • 3
  • 12
  • 24

1 Answers1

5

Usually it's enough to filter cells in UITableView conforming your search term. Hope you understand how that could be arranged. If you want highlight search term in a cell, your cell needs to support such highlight, than you could highlight calling something like [mycell highlightText:searchBar.text]. Ready cells don't support such highlight, you need to build your custom cell which will do that.

Valeriy Van
  • 1,851
  • 16
  • 19
  • I understood the concerns,here I'm building custom cell but I don't know the way to highlight search string. Thanks for help.. – Kuldeep Shige Sep 27 '11 at 14:52