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
2
votes
4 answers

How to hide keyboard in swift on press of navigationBar

I am developing an swift 3 app that has a navigation bar in every page. The navigation bar also has a button in the left. I need to resign the keyboard on touch of any object in the screen. I tried with the usual override func touchesBegan(_…
toing_toing
  • 2,334
  • 1
  • 37
  • 79
2
votes
0 answers

Changing the inputview property of a UITextView to nil leades tp app crash

I am trying to reopen system keyboard on dismissing date picker. I have written code as: [self.textView resignFirstResponder]; if ([self.textView.inputView isEqual:self.datePicker]) { //Display the keyboard self.textView.inputView =…
2
votes
5 answers

While displaying an alert in IOS, keyboard does not resign from View

While displaying an alert(Wrong password) in IOS 8, keyboard opens automatically and hide the alert(just in Iphone 4s because of the screen's size), so I can't click in "OK" and I also can't dismiss keyboard because first I need to close the alert!…
FelipeF
  • 23
  • 1
  • 3
2
votes
1 answer

Resign first responder issues with UIToolbar/UITextField

Alright - I'm implementing a UIToolbar consisting of a Done button onto a UIKeyboardTypeDecimalPad for a text field. Problem is, the method that will resign the responder on the text field is not being called. I have put in NSLogs to see what is…
2
votes
1 answer

UITextField keyboard dismiss on button click to UIApplication method

I'm going from storyboard to UISplitViewController in a xib. I want to logout of my storyboard view, which will bring me to the UISplitViewController. In the storyboard controller, I have a UITextField. I set it so that it doesn't dismiss itself…
2
votes
2 answers

Expected identifer or ')' Objective C

(IBAction)textFieldDoneEditing:(id)sender{//Expected identifer or ')' [sender resignFirstResponder]; } What's wrong? It's an example from "Beginning iOS 6 Development"
Frank
  • 497
  • 1
  • 6
  • 11
2
votes
4 answers

Dismissing Keyboard FirstResponder problems

So i am making an app and am having some problems with dismissing the keyboard from UISearchBar and UITextFields. Here is the structure of my app: NavigationController -> ViewC1 - (Modally)-> ViewC2 -(Modally) -> ViewC3 I have a search box in…
2
votes
2 answers

resignFirstResponder with subsequent processing problems (keyboard dismiss blocked or crash on iPhone 5)

I have the following workflow: Input in Textfield -> (Return key of TextField pressed: resignFirstResponder, IBAction of Button called) -> IBAction of Button: perform an intensive operation The problem is that the intensive operation is started…
FrankZp
  • 2,022
  • 3
  • 28
  • 41
2
votes
8 answers

I can not hide keyboard by pressing return key

I have tried this: In .h file : @interface TouchLabelViewController : UIViewController @property (strong, nonatomic) IBOutlet UITextField *aTextField; -(IBAction)hideKeyboard:(id)sender; In .m File…
user1541029
2
votes
5 answers

keyboard not responding to resignFirstResponder

Instead of showing the keyboard I want to display a popover view when a textField is selected (my code is at the bottom). If the keyboard isn't showing then everything works great. However, if the keyboard is showing and then the textfield is…
J Max
  • 2,371
  • 2
  • 25
  • 42
1
vote
3 answers

UISearchBar doesn't answer to resignFirstResponder when I want

I have a UITableView with an attached UISearchBar. When the user taps the search key in the keyboard I want to send a request to a server to get some information. Everything works fine, but the resignFirstResponder doesn't close the keyboard until…
1
vote
2 answers

Speed up keyboard dismissing or wait until it's done

I'm having an issue with my save button in a modal UINavController. When I press the save button, I'm dismissing the keyboard if it is still up, validating the data from the text fields, then showing a UIProgressView while I send my info out. My…
Bill Burgess
  • 14,054
  • 6
  • 49
  • 86
1
vote
1 answer

NSSearchFiled resign first responder

I have following code snippet to create NSSearchField programmatically mysearchField = [ [ NSSearchField alloc ] init]; [[mysearchField cell] setPlaceholderString:@"Page Number & Press Enter"]; [myView addSubview: mysearchField ]; …
ahmadbaig
  • 1,056
  • 1
  • 8
  • 9
1
vote
2 answers

UITextField not resigning keyboard

I've been bashing my head against the walls for some time now and still I haven't managed to break this problem. I have a modalViewController with on it a UITextField (let's call it myTroubleMaker) and several other non-important components. When I…
1
vote
0 answers

Picker is not working properly with keyboard dismiss with inline style

I am handling keyboard dismiss on tap event with following code, but the picker here is not responding with inline style. While with menu style, it pop up another layer on top of the form, it works well. import SwiftUI struct DismissKeyboardOnTap:…
Will Zhang
  • 11
  • 3