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.
精彩评论