回答

0

我想你已經爲此編寫了代碼。如果下面的控件是視圖(BottomView),那麼當您按下按鈕時,請更改BottomView的框架,以便爲文本框視圖留出空間。現在在那裏添加textField。將代碼寫入一個Animation塊。

[UIView beginAnimations:nil context:NULL]; 
    [UIView setAnimationBeginsFromCurrentState:YES]; 
    [UIView setAnimationDuration:0.3f]; 
// bottomView.frame = (new frame) 
// design a textfield in IB. make outlet. 
// textField.frame = (new frame)   
    [UIView commitAnimations]; 
+0

它的工作!謝謝! – 2010-10-29 12:25:35