我有一个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
.