开发者

Triggering an Action from a UISearchBar

开发者 https://www.devze.com 2023-02-16 18:41 出处:网络
Does anyone know a good method to look at for getting a search bar to trigger an action when the user touches it? i am 开发者_运维问答trying to create a search bar that when touched triggers a new sea

Does anyone know a good method to look at for getting a search bar to trigger an action when the user touches it? i am 开发者_运维问答trying to create a search bar that when touched triggers a new search View controller to get pushed.

Any help would be much appreciated.


Probably the simplest method would be to implement the UISearchBarDelegate Protocol in your view controller. Then, implement searchBarTextDidBeginEditing: in the delegate, and display your view inside of that method.

0

精彩评论

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

关注公众号