解决Keyboard 遮挡 UITextField的问题?

添加
    [[NSNotificationCenter defaultCenter] addObserver:mLoginView
                                             selector:@selector(keyboardWillShow:)
                                                 name:UIKeyboardWillShowNotification
                                               object:nil];        

在keyboardWillShow中调UIView坐标,UIView.center = CGPointMake(x,y);

然后在textField的Did End On Edit事件中再改回去

 

http://www.cocoachina.com/bbs/read.php?tid-30877-fpage-9.html

 

posted @ 2011-03-23 16:31  zyip  阅读(547)  评论(0编辑  收藏  举报