iPhoneKeyboard.active 激活
var active : bool
Description描述
Specifies if the keyboard is visible or is sliding into the position on the screen.
指定键盘是否显示或者正在向屏幕指定位置滑动。
Use this property to bring previously hidden keyboard back on the screen.
使用这个属性将事先隐藏的键盘带回屏幕。
// Hides the keyboard if the device is facing down
//隐藏键盘当设备面朝下的时候
// and resumes input if the device is facing up.
//然后恢复输入当设备面朝上的时候
private var keyboard : iPhoneKeyboard;
function Update() {
if (keyboard && Input.deviceOrientation == DeviceOrientation.FaceDown)
keyboard.active = false;
if (keyboard && Input.deviceOrientation == DeviceOrientation.FaceUp)
keyboard.active = true;
}
function OnGUI() {
if (GUI.Button(Rect(0, 10, 200, 32), "Open keyboard"))
keyboard = iPhoneKeyboard.Open("text");
}
最后修改:2011年4月8日 Friday 15:26