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
。