【问题标题】:UIPickerView as UITextField Input mode instead of keyboardUIPickerView 作为 UITextField 输入模式而不是键盘
【发布时间】:2018-06-13 19:15:26
【问题描述】:

我想使用选择器视图而不是键盘。 问题是我的 pickerView 总是在我的 viewController 上,所以我不能像往常一样使用 :textField.inputView = pickerView 。 我尝试使用 UITextField textFieldDidEndEditing 的委托,它可以工作,但我看不到实时更改我的 textField 的文本。

【问题讨论】:

    标签: swift uitextfield uikit uipickerview


    【解决方案1】:

    解决。我用了 func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int 方法在 textField 中显示文本

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-21
      相关资源
      最近更新 更多