0
我已經在我的項目3的UITextField問題與當焦點離開一個UITextView解僱鍵盤
我需要的時候裏面其中一個(uitextfield2)的自定義水龍頭子視圖出現,並需要鍵盤當輕敲出現彼此(uitextfield1)
的問題是,當我在uitextfield1選項卡,鍵盤出現,而不是去連我點擊返回或點擊另一個uitextfield2
我需要的鍵盤消失,當我點擊出來的uitextfield1或點擊返回時
我用下面的代碼
- (BOOL)textFieldShouldReturn:(UITextField *)textField { // When the return button is pressed on a textField.
[textField resignFirstResponder]; // Remove the keyboard from the view.
return YES; // Set the BOOL to YES.
}
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
// [textField resignFirstResponder];
[self SelectModalityClick]; // will be called If i tapped inside the uitextfield2 to display the custom view
return NO;
}
它在新屏幕中打開uiview,而不是在屏幕按鈕處顯示子視圖 – Ali 2011-02-14 11:29:44