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
3
votes
3 answers

How to resign keyboard in iOS

I have made a small program which I use to count the money in the safe at work, but after updating my iPhone, it didn't work anymore. After a lot of reading and so on I fixed everything, but I haven't found a new way to resign the keyboard. Before…
Alex Kristensen
  • 317
  • 1
  • 2
  • 7
3
votes
1 answer

Keyboard is not dismissing when navigating from another view ios

I have two view controller. suppose, viewcontroller1 and viewcontroller2. In viewcontroller1 I have a textview and a button. When I click textview keyboard open, and if press button keyboard dismiss nicely. I am using this code for dismiss…
Saad
  • 235
  • 2
  • 12
3
votes
4 answers

Dismiss keyboard when pressing "x" in UISearchBar

If i put the resign code inside my if condition the keyboard doesn't resign, if i comment the if condition my keyboard resigns. - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText { if (searchText.length == 0) { …
bruno
  • 2,154
  • 5
  • 39
  • 64
3
votes
2 answers

resignFirstResponder does not dismiss keyboard even though code is ran

This line of code is ran when my email textField editingDidEnd. The NSLog runs so I know the function is ran but the keyboard still does not go away. Ive connected the textBox as a delegate. Ive made sure the connections in storyboard are there. It…
Johnny Cox
  • 1,873
  • 3
  • 17
  • 17
3
votes
3 answers

Search Bar ResignFirstResponder hides Items

I have this search bar in my app Please see the play, next and previous buttons. When I search and click on a song from the search items resigning first responder for search bar hides my buttons i.e play, next and previous buttons. I am using this…
iYousafzai
  • 1,021
  • 1
  • 10
  • 29
3
votes
1 answer

ios resignFirstResponder reset animation

First sorry for my poor English!! In my app have a UIViewController and UIView is called subViewLogin inside subViewLogin have 2 UITextField are called username and password.When my app run subViewLogin is moved to position by…
3
votes
2 answers

resignFirstResponder on UITextView - slowing down the disappearance of the keyboard

I wonder is there any way to slow down the disappearance of a native keyboard in an iOS app when using resignFirstResponder on a TextView. The keyboard is going down too fast and I want it to go slower. Is that possible? EDIT: My context is this: I…
Sergey Grischyov
  • 11,995
  • 20
  • 81
  • 120
3
votes
1 answer

Receiving RemoteControlEvents to First Tab when interacting in Second Tab in a TabBar Controlled iOS App

I am developing an iOS app with a tab bar controller. In the first tab, I placed an instance of AVQueuePlayer to start playing music from the web. I did all coding to allow play and pause events through remote control events. But I could able to…
3
votes
5 answers

Dismiss keyboard for UITextView without using Return key

I'm using a UITextView and want to keep the normal usage of Return key, i.e. to insert a new line. But how do I dismiss the keyboard when I can't use the Return key for that?
per_jansson
  • 2,103
  • 4
  • 29
  • 46
2
votes
2 answers

iOS: "Message sent to deallocated instance" when resign first responder on a UITextView when its auto correction pop-up is shown

I have a custom toolbar with a "Done" button for the input accessary view of my text view. When this "Done" button is tapped I want to resign the text view from the first responder, so I call: [textView resignFirstResponder]; This will throw an…
Protocole
  • 1,733
  • 11
  • 28
  • 42
2
votes
1 answer

Iphone Objective C - resignFirstResponder upon tapping out of my UITableViewCell

Hihi all, My requirement is to hide the keyboard or picker when user tap out of my UITableViewCell (but still within the UITableView). I have found some post about overriding hitTest by subclassing UIView, but my class is subclass of…
joe kirk
  • 700
  • 2
  • 10
  • 25
2
votes
2 answers

SwiftUI Dismiss Keyboard from UITextField

So for my own reasons, I need the full control that UITextField and its delegates would normally offer, but the screen it's being added to is written with SwiftUI. Needs a .decimal keyboard, so no Return Key. I have only 2 issues remaining, 1 of…
2
votes
1 answer

iOS 13 UIContextualAction completion triggers unexpected keyboard dismissal

I have a UITableView with cells that have swappable UIContextualActions to delete or rename (edit) individual cell's TextFields. Since I made the switch to Swift 5 / iOS 13, triggering the rename UIContextualAction on these cells causes the keyboard…
2
votes
1 answer

iPad; TableView full of arbitrary number of text fields and buttons in different rows. resignFirstResponder on all textfields when button is pressed?

iPad: I have a tableView full of an arbitrary number of text fields and buttons in different rows. When you press a button I a modal popup will popup. If you press a button while editing a text field (and the keyboard is displayed on the iPad)…
MikeN
  • 45,039
  • 49
  • 151
  • 227
2
votes
2 answers

Mac NSTextField won't resign firstResponder

I have a window with some NSTextFields. When I click in one and edit the value and press return, I want the focus to go back to what it was before. I don't want the blue ring around the text field and I don't want further keystrokes going to that…
bsabiston
  • 721
  • 6
  • 22
1 2
3
11 12