iPhoneKeyboard.text 文本

var text : string

Description描述

Returns the text displayed by the input field of the keyboard. This value can be accessed at any moment, even if user has not yet finished input process.

返回显示在键盘输入区域的text(文字)。这个值可以在任何时刻被存取,即使用户尚未完成输入的过程中。

var inputText : String = "text";
private var keyboard : iPhoneKeyboard;
// Updates button's text while user is typing
//更新按钮的文字当用户正在打字的时候

function OnGUI() {
	if (GUI.Button(Rect(0, 10, 200, 32), inputText))
		keyboard = iPhoneKeyboard.Open(inputText);

	if (keyboard)
		inputText = keyboard.text;
}
Page last updated: 2011-4-8