我需要自定義UITextField's
inputView
的尺寸。我分配給inputView
的自定義視圖已經是260x220
的大小,但仍然inputView
顯示爲260x768(Portrait
)和260x1024(Landscap
)。我試圖改變inputView's
Frame
但仍然沒有改變。無論如何,我可以修改UITextField's
inputView
Frame
這樣它只在底部屏幕上佔據一定的空間嗎?iOS:自定義UITextField的inputView尺寸
textField.inputView = numPadViewController.view;
[textField.inputView setFrame:CGRectMake(0, 0, 260, 220)];
[編輯]
從this,我嘗試以下,以及和沒有工作!
numPadViewController.view.autoresizingMask = UIViewAutoresizingNone;
textField.inputView = numPadViewController.view;
可能的重複http://stackoverflow.com/questions/6042060/custom-keyboard-inputview-how-to-change-the-keyboard-size – Krizai