开发者

UISearchBar searches history

开发者 https://www.devze.com 2023-03-18 05:13 出处:网络
I\'d like to show use开发者_运维技巧r history of his previous searches in UISearchBar so he can choose from the list instead of retyping.

I'd like to show use开发者_运维技巧r history of his previous searches in UISearchBar so he can choose from the list instead of retyping.

Is there any built-in control in xcode for this, or i have to implement it myself?


There's no built-in control that does what you want. Searchbar doesn't even know what was previous search terms. You have to save it somewhere (Array or dictionary) for all or last 10 search terms and display in whichever you want.

0

精彩评论

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

关注公众号