我有这个问题..我有一个包含 uitableview 的 View ,每一列位于不同的行上(用于编辑一行,例如地址簿) 一切正常,但如果我单击底部的最后一个字段,键盘会出现,但出现在该字段上方,我什么也看不到......
我该如何解决这个问题?
提前致谢
最佳答案
注册一些通知:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWasShown:) name:UIKeyboardDidShowNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWasHidden:) name:UIKeyboardDidHideNotification object:nil];
将表格 View 中的行滚动到监听器中的可见位置:
keyboardWillShow
keyboardWasShown
keyboardWillHide
keyboardWasHidden
>.
关于ios编辑表格,键盘隐藏字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4928216/