开发者

set helper grey text for UISearchBar

How can i set a default text in 开发者_运维技巧the search bar that looks grey so that it may hint what you could search before the user touches the search bar so that he may write something?

For example, i could have "Search for coffee shops or restaurants" and when i touch the UISearchBar the text dissapears ?


Try Placeholder property of UISearchBar...and set it as Search for coffee shops or restaurants

Happy coding..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜