views:

26

answers:

1

Hi,

I have a Uisearchbar in the bottom of view. When i try to do a search the keyboard pops up. Because the searchbar is in the bottom the keyboard hides the searchbar.

Can anyone please help me on how to avoid this problem in code

Thanks in Advance

A: 

In the action where you are calling becomeFirstResponder, you need to resize your subviews. Something like:

    mySearchBar.frame = CGRectMake(0, 0, 320, 20);
Jonah