Questions tagged [becomefirstresponder]
176 questions
3
votes
1 answer
Cocoa-Touch - Make a read-only UITextField become first responder
I have a UITextField which I have set it's inputView to be of a UIPickerView so the user can choose between a few values there. However I'm having trouble making the textfield become first responder.
If I set my textfield userInteractionEnabled = NO…

Peter Warbo
- 11,136
- 14
- 98
- 193
2
votes
2 answers
UITextField becomeFirstResponder works only once
In my app, there is the ability for the user to input their name.
A UITextField is added to the view and becomeFirstResponder is called.
In the textFieldShouldReturn method, resignFirstResponder is called.
Then in textFieldShouldEndEditing, the…

user1270338
- 21
- 2
2
votes
1 answer
How to suppress virtual Keyboard slide-in animation?
I've got a problem with creating a modal search view that emulates the behaviour of that of the Weather app. Specifically, there are two animations, that are bothering me and introduce unneeded 0.2 s delays:
When the modal view becomes visible, I…

Chris
- 3,192
- 4
- 30
- 43
2
votes
1 answer
Why does NSWindow become first responder when unbinding an object
I manually bind the value of a NSTextView to a property of an object. When I call unbind, the window becomes first responder ... Why?
I don't want that!

brutella
- 1,597
- 13
- 26
2
votes
0 answers
Is there a way to make the WKWebview a firstResponder?
The Main idea is to reload the WKWebView if there is no touches or presses detected (i.e When webView remains inactive for some timeinterval ) . I tried the way to implement
touchesBegan(_:with:) and
touchesEnded(_:with:)
I have overwritten those…

Muhmud Jafr
- 21
- 1
2
votes
3 answers
How to have UITextView becomeFirstResponder after touching its UIView subview?
UPDATE: I found a simple solution. I knew there was one!
I have a UIView subclass called tipBalloon that I've added as a subview of a UITextView, but when I touch tipBalloon, it doesn't focus the text view even though…

ma11hew28
- 121,420
- 116
- 450
- 651
2
votes
1 answer
Swift: How to make NSTextField first responder in NSAlert
I have a simple login dialog that asks for a password. On the modal is a NSSecureTextField. I would like this to be the first responder but I haven't been able to find how to do this?
func loginDialog(question: String) -> String
{
let alert =…

iphaaw
- 6,764
- 11
- 58
- 83
2
votes
2 answers
becomeFirstResponder: automatically scroll to the UIControl that becomes first responder
I have a grouped UITableViewController with one section and many rows. Each cell consists of two elements: a UILabel with a description and a UITextField for an input. A form, I would say.
On the bottom is a button "Next" the go to the next view.…

Manni
- 11,108
- 15
- 49
- 67
2
votes
1 answer
Xcode 9.3.1 - iOS Swift 4.1 UITextView.becomeFirstResponder Thread 1: EXC_BAD_ACCESS (code=1, address=0x4d555458)
After updating to Xcode 9.3.1, I've encountered a Thread BAD_ACCESS crash when the keyboard appears by manually making a UITextView becomeFirstResponder.
To be clear, this has previously worked just before updating Xcode to 9.3.1 but now I can't…

Chrishon Wyllie
- 209
- 1
- 2
- 11
2
votes
2 answers
UICollectionView becomeFirstResponder wrong behavior
Im using UIColletion view with custom cell with UITextField inside it. As I found out, the collectionView does automatic scrolling, when textField become first responder so the keyboard doesn't cover edited field.
The problem is, that this function…

Martin Kubišta
- 63
- 1
- 6
2
votes
2 answers
becomeFirstResponder not showing from viewDidLoad
Here I have a simple example. im calling FirstResponder in viewDidLoad. But accessory view only shows up after tapping the screen. Why isn't it showing from the start?
class TestViewController: MainPageViewController {
private let…

HelloimDarius
- 695
- 5
- 23
2
votes
3 answers
UIsearchController not becoming first responder in ios 9
I have a UISearchController in the navigation bar and it worked fine until now.
Only on iOS 9 the search bar refuse to be the first responder after the controller is loaded.
The code in viewDidLoad:
self.searchController = ({
let controller…

Deano
- 21
- 1
- 3
2
votes
1 answer
UITextView: How to programmatically set selectedRange and becomeFirstResponder?
I have a UITextView containing a document. If the user touches the document, the insertion point (selectedRange property) is set appropriately and the UITextView becomes the first responder (keyboard appears). YAY!
How can I do the same thing…

strawtarget
- 1,059
- 2
- 9
- 18
2
votes
2 answers
becomeFirstResponder resets x/y position of other views
I am doing some animation on two UITextFields. When one text field is done with editing, I use UIView.animateWithDuration to animate the first text field to the left, and another call to UIView.animateWithDuration to show the second text field for…

Tyler
- 19,113
- 19
- 94
- 151
2
votes
1 answer
UISearchBar cannot become first responder after UITableView did re-appear
I have an iPhone app for iOS8. UIPageViewController has a child view of UITableViewController, and that's where I put UISearchController.
When the UITableViewController is presented for the first time, I have no trouble activating the search by…

tsuyoski
- 614
- 5
- 22