Questions tagged [becomefirstresponder]
170 questions
0
votes
2 answers
Programmatically place the Cursor inside a textField of a custom tableView header
How can you programmatically make sure that the cursor of a tableView-HeaderView-TextField gets active (i.e. is the first responder) ??
My table looks like this (i.e with the custom TextField header). So far, the cursor only gets inside the grey…
![](../../users/profiles/3826232.webp)
iKK
- 4,553
- 5
- 45
- 93
0
votes
0 answers
ios7 when I present a view which contains a searchbar, and then i set it becomeFirstResponder,it will appear a strange animal and I don't wanted it
Under ios7 when I present (don't push) a viewController which contains a searchbar, and then set the place holder in order to see the animal and then I set it becomeFirstResponder,it will appear a animal and I don't wanted it.
Code:
UISearchBar *bar…
![](../../users/profiles/4242053.webp)
lidechao
- 3
- 4
0
votes
2 answers
UITextField resigning firstResponder too early
I have two instances of a UITextField. The returnKeyType of the first text field is UIReturnKeyNext, and the returnKeyType second text field is UIReturnKeyDone. Based of this SO answer, I'm trying resign the first responder of the first text field…
![](../../users/profiles/2317675.webp)
narner
- 2,729
- 3
- 22
- 54
0
votes
1 answer
return being called twice in ios app
I'm trying to implement a very basic login screen in my iOS app with username and password textfields.
I looked up how to have the view automatically focus on the passsword textfield after the user taps "next" upon entering a username. However,…
![](../../users/profiles/1720985.webp)
scientiffic
- 8,169
- 13
- 68
- 138
0
votes
1 answer
How to switch focus (becomeFirstResponder) between textfields in different parent views
I have 3 custom objects which each contains 3 uitextfields.
when I press next in the keyboard I am able to pass focus to the next UITextFiled though textFieldShouldReturn and becomeFirstResponder. this is fine while they reside in the same parent…
![](../../users/profiles/1126721.webp)
Ben Quan
- 639
- 9
- 22
0
votes
4 answers
Textfield should becomesfirstresponder after entering four digits in another textfield
I have two UITextfields as follows,
If the user enter 4 digits in the first textfield, then the second textfield should becomesfirstresponder. I have tried below code,
- (BOOL)textField:(UITextField *)textField…
![](../../users/profiles/756941.webp)
Nazik
- 8,393
- 26
- 72
- 115
0
votes
2 answers
How to make an iOS page with keypad up?
I want to create a text message page and want to see the keyboard on page load. This is what I have which doesn't work. Can you find what I'm doing wrong?
In my header file:
@interface taskViewController : ViewController
@property (nonatomic,…
![](../../users/profiles/362921.webp)
Adam Boostani
- 4,713
- 6
- 33
- 41
0
votes
2 answers
becomeFirstResponder is triggering UIKeyboardDidHideNotification
One goal of my app is to manage multiple custom input views (from nibs) along with the regular system keyboard. One or the other will always be present. (In the example code I am only managing a single nib + the system keyboard).
When swapping out…
![](../../users/profiles/1283762.webp)
Electro-Bunny
- 1,350
- 2
- 12
- 31
0
votes
3 answers
how to dismiss a keyboard when there is no textfield to resignFirstResponder
in the following scenario clicking on the pencil turns the iz 1 text to be editable by making it becomeFirstResponder and the keyboard opens, I wish to close the keyboard when clicking on the "empty rows" or iz2.
how can i do that?
I've tried…
![](../../users/profiles/2105640.webp)
liv a
- 2,854
- 6
- 29
- 69
0
votes
2 answers
When textfield become first responder, gesture recogniser not responding, even after resign
I've probably missed something...
First, I inherited from UITextField and added a Tap gesture recogniser to a UITextField (in the designated initialiser):
UITapGestureRecognizer * ges = [[UITapGestureRecognizer alloc] initWithTarget:self…
![](../../users/profiles/453051.webp)
Yony
- 644
- 1
- 8
- 20
0
votes
1 answer
UITextView becomes first responder but the pointer doesn't go there
Ok so I have a rather weird issue: My UITextView becomes the first responder and I can tell because the keyboard appears, but what happens is that the pointer doesn't show up and the text can't be edited even if you type. This is the only UITextView…
![](../../users/profiles/2287962.webp)
isklikas
- 190
- 2
- 16
0
votes
1 answer
Using becomeFirstResponder causes cancel button to not work
I have a UISearchDisplayController (searchDisplayCtr) and a UISearchBar (searchBar). I am trying to give focus to the search bar and bring up the keyboard when I click the search icon in the alphabet scroll on the right. If I…
![](../../users/profiles/2429450.webp)
Shay
- 237
- 1
- 5
- 12
0
votes
1 answer
Make UITextField first responder
In a unit test I am trying to call becomeFirstResponder method on a UITextField, but I am getting NO i.e. its not becoming the first responder.
The code looks as below:
UITextField *textField = [self.controller.searchBar valueForKey:…
![](../../users/profiles/697033.webp)
tech_human
- 5,440
- 14
- 53
- 88
0
votes
1 answer
How can I get noticed when subclassed NSSecureTextField get focus each time?
I subclassed NSSecureTextField, and overrided -(BOOL)becomeFirstResponder,but it only works well when my custom NSSecureTextField get focus at the first time.
![](../../users/profiles/2807006.webp)
Gaojin
- 1
- 2
0
votes
2 answers
UIAlertView doesn't slide up Automatically when keyboard appears on becomeFirstResponder
I have subclassed UIAlertView and inside which I am showing a textField which takes the input. When user clicks on textField the keyboard shows up and UIAlertView moves up to adjust for keyboard. But when I do [textField becomeFirstResponder] in…
![](../../users/profiles/1782197.webp)
nefarianblack
- 712
- 6
- 16