When dismissing keyboard how do I keep my existing text fields in the same location?
问题 So I have a UIScrollView that contains UITextFields and UILabels, and when the user clicks inside a UITextField the keyboard shows. But I need a way to allow the user to dismiss the keyboard and I was try to use the swipe down gesture to do it (as in Messages). I added the Gesture Recognizer to my view in the storyboard and added the Action to the header file. Here is the method: - (IBAction)SwipeKeyboardDown:(id)sender { if(self.moveTextField) { [self.moveTextField resignFirstResponder]; } }