How do I set selection on TextField in Air 2.7 for iOS?
I am trying to use setSelection
on a TextField
in an air 2.7 for ios app. But the selection is not set and the keyboard does not appear. I understand that the 2.7 version encourages using the requestSoftKeyboard
bu开发者_开发问答t this method is not supported on ios devices.
It works fine in the desktop version.
Any pointers would be greatly appreciated.
You may need to forcibly set the stage.focus
to your TextField
.
var myTF:TextField = new TextField();
myTF.type = TextFieldType.INPUT;
addChild(myTF);
stage.focus = myTF;
Read more in the docs (which is where I stole this snippet)
精彩评论