views:

96

answers:

3

In my iphone apps, my problem is that I have a textfield at the bottom of the screen, so when the keyboard appear, he hides the textfied, there is a way to show the keyboard on the top of the screen?

thanks, Alex

+1  A: 

You should design your view so that it shifts up with the keyboard, iPhone users are used to the keyboard always being on the bottom of the screen so this would go against the HIG

Flash84x
A: 

same problem bt resolved

Arsalan
A: 

you should mone ur view when keyboard is appeared the code is

in .m file

  • (void) loginViewUp : (UIView*) view {
    if(!alreadyViewUp) { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.3]; CGRect rect = view.frame; rect.origin.y -= View_Move_Hight; view.frame = rect; [UIView commitAnimations]; alreadyViewUp = !alreadyViewUp; } }

  • (void) loginViewDown :(UIView*) view {
    if(alreadyViewUp) { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.3]; CGRect rect = view.frame; rect.origin.y += View_Move_Hight; view.frame = rect; [UIView commitAnimations]; alreadyViewUp = !alreadyViewUp; } }

in .h file - (void) loginViewUp : (UIView*) view;

here

define View_Move_Hight 170

is define bofore @implementation hope it works

reply must!!!!

Arsalan