【发布时间】:2015-04-08 17:15:58
【问题描述】:
我在 UITableView 的最后一个单元格中有一个 UItextField。 我处理键盘隐藏的代码:
func keyboardWillBeHidden(aNotification:NSNotification) {
let contentInsets: UIEdgeInsets = UIEdgeInsetsZero
tableView.contentInset = contentInsets
tableView.scrollIndicatorInsets = contentInsets
}
在 iOS8 上完美运行,动画流畅。 在 iOS7 上粗暴地回到原来的位置(无动画)!
iOS7 的解决方案是什么?
【问题讨论】:
-
你试过把所有东西都放到动画块里吗?
-
尝试将您的代码放在 UIView 中。 + animateWithDuration:delay:options:animations:completion:function.
标签: ios uitableview swift uitextfield