最近我用它来在选择文本字段时将 View 移到键盘后面
http://www.ioscreator.com/tutorials/move-view-behind-keyboard-ios8-swift
如果我只需要移动某些输入的 View ,而其他输入接近顶部并且不需要它怎么办?我尝试了以下代码,但没有成功。
var searcher
func keyboardWillShow(notification: NSNotification) {
if (searcher.tag == 1){
if let userInfo = notification.userInfo {
if let keyboardSize = (userInfo[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.CGRectValue() {
kbHeight = keyboardSize.height
self.animateTextField(true)
}
}
}
}
提前致谢!
最佳答案
关于iphone - 当选择文本字段时将 View 移到键盘后面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35771087/