ios - How can I add a Number and Decimal keyboard into my Custom Keyboard on iOS8? -


I created a custom keyboard in Swift but it was rejected from the App Store because: "Number of keyboard extensions and Decimal does not include type ".

How can I easily add these two keyboards?

I tried to rebuild the original scene but it is not working properly. I'm sure there is a solution to create 2 or 3 different views and switch between them.

How do I switch between keyboard types when the type of keyboard changes?

You can detect changes to the keyboard type in textDidChange . You need to get the UITextDocumentProxy , then locate the proxy's keyboardType , and then you can make changes to the layout you can make.

  override func textDidChange (_ text input: UITextInput?) {// when document references change - theme or keyboard type change proxy = self.textDocumentProxy as UITextDocumentProxy if proxy. KeyboardType == UIKeyboardType.numberPad || Proxy.keyboardType == UIKeyboardType.decimalPad {// Add code here to display number / decimal input keyboard}}    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -