Questions tagged [resignfirstresponder]

A UIResponder method added for handling remote-control events. for iOS 4 and iOS4+

When the user taps a control that can accept first responder status, that control is sent the becomeFirstResponder message. Until another control becomes the first responder or the current control is sent the resignFirstResponder message, that control will keep this status and receive keyboard and shake input.

170 questions
1
vote
2 answers

Swift resigning TextView from first responder

I have a TextField and a TextView in my ViewController. The ViewController follows both UITextFieldDelegate and UITextViewDelegate and their delegate methods. I want to resign the TextField or the TextView from being the first responder when the…
1
vote
0 answers

Hide textField keyboard without resigning first responder

I would have been confident that I could have found this answer elsewhere, but I have researched extensively without finding a suitable answer. I am trying to hide the keyboard on hitting the "return" key, however, I need the textField to remain…
Jacobo Koenig
  • 11,728
  • 9
  • 40
  • 75
1
vote
3 answers

iOS UITextField resignFirstResponder issue

In my app, on registration screen, I have tableView which containes UITextField in each cell and Submit button in a footer. Everything works fine except when I enter value in the last TextField and hit submit button (Without resigning a keyboard).…
NotABot
  • 516
  • 1
  • 8
  • 27
1
vote
1 answer

End UITextView editing when tapping on a UIControl

I'm trying to end editing a UITextView when I click a UIControl on another cell. If I tap on a cell containing the UIControl, the text view ends editing, as expected. However, when I tap on say, a UIStepper, the control responds fine but the text…
titusmagnus
  • 2,014
  • 3
  • 23
  • 23
1
vote
1 answer

'resignFirstResponder()' returns true and the text field loses focus but the keyboard does not dismiss

I have a storyboard scene that only has two UITextField.The first one is left untouched, fresh out of the object library. The second one has its delegate outlet connected to the ViewController's code. App's interface The second text field's…
1
vote
2 answers

Why does resignFirstResponder reset contentOffset on a UITextView?

No matter which settings I try to change, resignFirstResponder always forces the text to scroll to the top of a UITextView I would like the keyboard to disappear but the content offset to remain the same. Any solutions would be greatly appreciated.
Nate4436271
  • 860
  • 1
  • 10
  • 21
1
vote
3 answers

Move From UITextField to UITextView When Return Pressed

I have several text views in my app. All but one are UITextField, and the other is a UITextView, located right in the middle of the others. This is due to this section needing much more room for the user to type and see all of what they are typing…
1
vote
1 answer

Dismissing the keyboard while simulating a wait

This function is designed to simulate a wait if the user is successful logging in. As you can see I dismiss the keyboard first but that doesn't stop NSThread from sleeping before the keyboard is dismissed. I think I need to harness the power of the…
Macness
  • 1,226
  • 2
  • 13
  • 24
1
vote
3 answers

How to dismiss all keyboards of multiple text fields?

I have three text fields in one view controller and when i do the method to dismiss the keyboard for all three text fields, the view controller doesn't come out. - (void)viewDidLoad { [super viewDidLoad]; self.namesuite.delegate = self; …
1
vote
4 answers

unrecognized selector sent to instance resignFirstResponder

I'm using TPKeyboardAvoiding in my app to hide move text fields when the keyboard is showing, but I'm getting an exception when I try to end editing the text field. It's coming from this method in TPKeyboardAvoiding: - (void) touchesEnded:(NSSet…
Connor Pearson
  • 63,902
  • 28
  • 145
  • 142
1
vote
1 answer

Crash when using endEditing with textfields in a table view

In my code, i have around 8 UITextFields in a UITableView, each one in a row. I also have a UIBarButtonItem that when selected, calls the method hideKeyboard. When the user selects a textfield, and then scrolls the tableview so that the textfield is…
1
vote
3 answers

Hide Keyboard in iOS

I want to hide the keyboard after entering the data. I have tried both methods which are given below. [self.textField resignFirstResponser]; [self.view endEditing:YES]; Both are working well but i want to know the difference between these two…
Aly
  • 391
  • 1
  • 13
1
vote
1 answer

How to deploy iOS 7 mail.app search bar with cancel button functionality

I am looking to create a searchBar and while I have it somewhat working on my Table View, there's still a bit of effort required to get it 100% perfect. With reference to iOS 7 Mail.app, how do I deploy something like that? So a search bar that…
amitsbajaj
  • 1,304
  • 1
  • 24
  • 59
1
vote
4 answers

Resigning Number Pad of TextField ios

I am using the keyboard type Number Pad for a particular Text Field which is to be given with a zip number. When using regular keyboard i use resignfirstresponder to quit the keyboard when i click on the enter key in that keyboard. But for the…
Spidy
  • 1,137
  • 3
  • 28
  • 48
1
vote
3 answers

Focus of cursor is not shifting to next UITextView in ios

This is my First question on ios I am using two UITextView objects (textView1 and textView2) in a View, Each of them has some character limit with some following Scenario: Initially user can only enter into textView1. When the entered character…
Amit Pal
  • 10,604
  • 26
  • 80
  • 160