2010-07-10 51 views

回答

2

讓它成爲第一響應者。請參閱this link瞭解Apple的教程。

+0

像一個魅力工作 – 2010-07-10 08:56:03

+0

很高興聽到它。 – jer 2010-07-10 09:07:39

1

簡單

[self.myTextView becomeFirstResponder]; 
0

調用對象是一個急救員將做到這一點。但我花了幾分鐘的時間找出最好的分配它.. 最後!

[UITextFeild becomeFirstResponder]; 

如果您有例如動畫的UIView,它分配的圖繪後。

[UIView animateWithDuration:0.9 
animations:^{ 
    UIView.frame = newFrame; 
} 
completion:^(BOOL finished){ 
    [UIView animateWithDuration:0.9 
     animations:^{} 
     completion:^(BOOL finished){ 
     [UITextFeild becomeFirstResponder];// << Right here.. 
    }]; 
}]; 
相關問題