开发者

Iphone UIsearcbar - Problem keyboard hides the searchbar

开发者 https://www.devze.com 2023-01-04 21:48 出处:网络
I have a Uisearchbar in the bottom开发者_高级运维 of view. When i try to do a search the keyboard pops up.

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


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

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

精彩评论

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