Search code examples
tvostvml

How do I get a numbers-only keyboard on a TVML textField?


I'm building a TVML/TVML-based tvOS app and want to use a numbers-only keyboard on my textField element but the documentation currently doesn't say how to do that.


Solution

  • On the textField TVML element, you can specify a keyboardType attribute with a value of numberPad to get a number pad keyboard.

    <textField keyboardType="numberPad">Placeholder</textField>