views:

192

answers:

1

There are lots of apps where the searchbar moves upwards if active and moves down when it is inactive. There is a sample code from apple available which works with IB, but how can I achieve this behavior programmatically? Mostly it is combined with a navigationbar which moves out of the screen in replace with the searchbar

+1  A: 

When the search bar becomes first responder it will animate itself. You can call [searchBar becomeFirstResponder]; or something like that, checkpoint the docs.

JoePasq