变量 + insertText Swift deleteBackward() + insertText(".")

Variable + insertText Swift deleteBackward() + insertText(". ")

我正在制作自定义键盘。我想要一个自动周期函数,但我的代码有一个 error.Please 帮我解决它

代码:

@IBAction func autoPeriod(button: UIButton) {
    (textDocumentProxy as UIKeyInput).deleteBackward() + insertText(". ")
}

干杯,

帕拉什

我想通了:

代码:

@IBAction func autoPeriod(button: UIButton) {
    (textDocumentProxy as UIKeyInput).deleteBackward()
    (textDocumentProxy as UIKeyInput).insertText(".")
}