Reputation: 335
I am making a customized iOS 8 keyboard. I created a button called Return and I'm stuck because I don't know how to make Return or Enter key work properly. I found many textFielsShouldReturn
tutorials but I don't think it belongs to iOS keyboard extensions.
Upvotes: 0
Views: 388
Reputation: 335
Okay. I got it so easy in short time. This is what i did.
@IBAction func returnPressed(sender: AnyObject) {
var proxy = textDocumentProxy as UITextDocumentProxy
proxy.insertText("\n")
}
Upvotes: 2