UIScrollView多くのUITextFieldコントロールを持つビューがあります。いずれかのUItextFieldコントロールを入力した後、別の場所をクリックしてから別のビューに移動すると、同じビューに戻ると、UITextField.
UITextFieldビューの各コントロールにもこのコードがあります。
//self.QuestionAnswer = UITextField - This is the control with the issues.
[self.QuestionAnswer addTarget:self action:@selector(SaveQuestionAnswer:) forControlEvents:UIControlEventEditingDidEndOnExit];
[self.QuestionAnswer addTarget:self action:@selector(SaveQuestionAnswer:) forControlEvents:UIControlEventEditingDidEnd];
//sender = self.QuestionAnswer - This control is of type UITextField.
-(IBAction)SaveQuestionAnswer:(id)sender
//some code here
[control resignFirstResponder];
//some code here
}
[control resignFirstResponder]へのフォーカスを失ったときに が実行されることも確認しましたUITextField。