我已注册表单,当键盘隐藏时,我正在更改内容插入和偏移,之后我无法捕捉到任何触摸事件。
-(void)keyboardWillShow:(NSNotification *)notification {
CGRect keyboardRect = [[[notification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
//calculating values
self.scrollView.contentInset = contentInsets;
self.scrollView.scrollIndicatorInsets = contentInsets;
[self.scrollView setContentOffset:scrollPoint];
}
-(void)keyboardWillHide:(NSNotification *)notification {
self.scrollView.contentOffset = CGPointMake(0, 200);
self.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
self.scrollView.scrollIndicatorInsets = self.scrollView.contentInset;
}
如果我删除偏移或插入的更改,则效果很好。但我需要设置偏移和插入。