开发者

set helper grey text for UISearchBar

开发者 https://www.devze.com 2023-04-05 03:10 出处:网络
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?

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

精彩评论

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