Imam Arief W Imam Arief W - 2 years ago 137
Objective-C Question

set first text on UISearchBar

i want to set first text on my UISearchBar -the text is "Search"-, and the text will disappear when user start typing.
just like this:

alt text
alt text

how it could be.???

Answer Source

use placeholder property to set your grayish text that get disappears while text is written on it

searchBar.placeholder = @"Search";
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download