给输入框添加一个监听方法
例: this.phoneInput.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onClick, this);
在监听方法中写入以下代码
private onClick(e: egret.TouchEvent): void
{
var isShowKeyBoard: boolean = true;
if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent))
{
window.setTimeout(function ()
{
if (!isShowKeyBoard) alert('document.activeElement==' + document.activeElement);
document.activeElement.scrollIntoView(isShowKeyBoard ? true : false);
}, 100);
}
}