Imam Arief W Imam Arief W - 6 months ago 31
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.???
thanx

Answer

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

searchBar.placeholder = @"Search";
Comments