I am working in an app in which I need to add a button beside the search box in UISearchbar. I tried to find a solution for this but the only way I've found is using UINavigationBar. However, I need to animate the searchbar on begin and end of an editing event, so putting it on a navigation bar doesn't meet my needs.

I have put my search bar in my UITableview's header view so that it can scroll with the table view. It works fine and animates as expected and of course scrolls, except for the button beside the search box.

Is there any other way to add a button beside the search box in UISearchBar?

IB should work as well. Just make sure to connect the UISearchbar delegate to the View Controller and use its delegate methods from the VC, or alternatively use IBactions called from your searchBar to pass your data and actions to the VC logic. Nelson