【问题标题】:iOS swift Custom keyboard not detecting keyboardTypeiOS swift自定义键盘未检测到keyboardType
【发布时间】:2017-03-01 07:51:08
【问题描述】:

我正在通过子类化 UIInputViewController 来实现自定义键盘。

我想为 emailAddress 实现键盘。

我有 Xcode:- 8.1 iOS:-10.1 和 swift 版本:- 3.0

我正在尝试查找keyboardType的代码

  textDocumentProxy.keyboardType?.rawValue
  (textDocumentProxy as UIKeyInput).keyboardType?.rawValue

但是这两行总是给出默认键盘类型 0。

请任何人帮助我。

【问题讨论】:

标签: ios iphone swift xcode


【解决方案1】:

这里的文本域是类文本域的对象。

textField.keyboardType = .emailAddress

【讨论】:

  • 问题与extenson有关
  • 抱歉,我想查找键盘类型,我不想更改键盘类型。
猜你喜欢
  • 2014-11-24
  • 2015-11-23
  • 2015-02-08
  • 2015-08-05
  • 2018-04-03
  • 1970-01-01
  • 2014-08-11
  • 1970-01-01
  • 2018-05-24
相关资源
最近更新 更多