iPhone开发  当输入的键盘会挡住UITextField的处理事件,当键盘消失的时候界面还原

挡住的处理事件地址在:http://www.cnblogs.com/fanwa/archive/2012/02/14/2350667.html

以下是还原的处理事件:

注册监听事件:

[[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(keyboardWillBeHidden:) name:UIKeyboardWillHideNotificationobject:nil];

事件代码:

- (void)keyboardWillBeHidden:(NSNotification*)aNotification {    

    CGPoint scrollPoint = CGPointMake(0.0, 0.0);

    [scView setContentOffset:scrollPoint animated:YES];

}

posted @ 2012-02-14 11:32  凡娃软件  阅读(409)  评论(0编辑  收藏  举报