我试图将光标放在 UITableView 中的第一个 UITextField 中,并让键盘显示为这样写的。
if (indexPath.row == 0) {
cell.inputTextField.becomeFirstResponder()
}
但是警告显示是这样的。
Result of call to 'becomeFirstResponder()' is unused
如何将光标放在第一个 UITextField 上,让 KeyBoard 显示出来?
最佳答案
我在覆盖'becomeFirstResponder'时遇到它,如果你想删除它,你可以使用 @discardableResult
关于ios - 调用 'becomeFirstResponder()' 的结果是 UITableView 中未使用的 UITextField,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48900317/