TVML - how to modify formTemplate to show “pin entry”

别说谁变了你拦得住时间么 提交于 2020-01-17 13:57:07

问题


TVML's formTemplate can easily be adapted to only allow numeric input:

<formTemplate>
  <textField keyboardType="numberPad">0000</textField>
  <footer>
    <button>
      <text>${TEXT("Submit")}</text>
    </button>
  </footer>
</formTemplate>

This gives a page like...

I would like to reduce it even further to only display a "pin entry" screen as shown here:

Is this possible with TVML, without hosting an own UIControl? I have nowhere found any mentioning of changing styles like this. Any idea how to achieve this? Thanks!


回答1:


Use secure attribute in textField

https://developer.apple.com/library/tvos/documentation/LanguagesUtilities/Conceptual/ATV_Template_Guide/TVJSAttributes.html#//apple_ref/doc/uid/TP40015064-CH42-SW37

  <textField keyboardType="numberPad" secure="true">0000</textField>


来源:https://stackoverflow.com/questions/34434312/tvml-how-to-modify-formtemplate-to-show-pin-entry

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!